aboutsummaryrefslogtreecommitdiff
path: root/plugins/utils.c
diff options
context:
space:
mode:
authorGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2003-08-08 05:09:40 +0000
committerGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2003-08-08 05:09:40 +0000
commita9f992033fc32c0cca125e80d3d96aacfc78b802 (patch)
treebad34ea7077716b4b074ee66ba3259097a4f3108 /plugins/utils.c
parent65ca899d2c98b6342783922a5709c4b61e6b2b1f (diff)
downloadmonitoring-plugins-a9f992033fc32c0cca125e80d3d96aacfc78b802.tar.gz
fix a variety of compiler warnings about qualifier discards and other pedantic stuff
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@663 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/utils.c')
-rw-r--r--plugins/utils.c38
1 files changed, 2 insertions, 36 deletions
diff --git a/plugins/utils.c b/plugins/utils.c
index 959541bf..aed03c4e 100644
--- a/plugins/utils.c
+++ b/plugins/utils.c
@@ -67,7 +67,7 @@ void usage2(char *msg, char *arg)
}
void
-usage3 (char *msg, char arg)
+usage3 (char *msg, int arg)
{
printf ("%s: %s - %c\n", progname, msg, arg);
print_usage();
@@ -111,7 +111,7 @@ For more information about these matters, see the file named COPYING.\n"));
}
-char *
+const char *
state_text (int result)
{
switch (result) {
@@ -338,40 +338,6 @@ strscpy (char *dest, const char *src)
/******************************************************************************
*
- * Concatenates one string to the end of another
- *
- * Given a pointer destination string, which may or may not already
- * hold some text, and a source string with additional text (possibly
- * NULL or empty), returns a pointer to a string that is the first
- * string with the second concatenated to it. Uses realloc to free
- * memory held by the dest argument if new storage space is required.
- *
- * Example:
- *
- * char *str=NULL;
- * str = strscpy("This is a line of text with no trailing newline");
- * str = strscat(str,"\n");
- *
- *****************************************************************************/
-
-char *
-strscat (char *dest, const char *src)
-{
-
- if (dest == NULL)
- return src;
- if (src != NULL)
- asprintf (&dest, "%s%s", dest, src);
-
- return dest;
-}
-
-
-
-
-
-/******************************************************************************
- *
* Returns a pointer to the next line of a multiline string buffer
*
* Given a pointer string, find the text following the next sequence