From a9f992033fc32c0cca125e80d3d96aacfc78b802 Mon Sep 17 00:00:00 2001 From: Karl DeBisschop Date: Fri, 8 Aug 2003 05:09:40 +0000 Subject: 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 --- plugins/utils.c | 38 ++------------------------------------ 1 file changed, 2 insertions(+), 36 deletions(-) (limited to 'plugins/utils.c') 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) { @@ -336,40 +336,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 -- cgit v1.2.3-74-g34f1