diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-08-07 11:51:12 +0000 |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-08-07 11:51:12 +0000 |
commit | 9e17dab6c3e4b4e7142f3ea5b2a60fcd488dc709 (patch) | |
tree | cb5831f4c018edc441686b2fe7715eb91de4ffee /plugins/utils.c | |
parent | 7f1bb2a782a008b55b0ef657ec01d7fbdb637fd4 (diff) | |
download | monitoring-plugins-9e17dab6c3e4b4e7142f3ea5b2a60fcd488dc709.tar.gz |
replace "terminate" with "die" for shorter name and better readability
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@656 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/utils.c')
-rw-r--r-- | plugins/utils.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/plugins/utils.c b/plugins/utils.c index 5f770a1f..959541bf 100644 --- a/plugins/utils.c +++ b/plugins/utils.c @@ -132,17 +132,6 @@ void die (int result, const char *fmt, ...) { va_list ap; - printf ("%s %s: ", sizeof (char) + index(progname, '_'), state_text(result)); - va_start (ap, fmt); - vprintf (fmt, ap); - va_end (ap); - exit (result); -} - -void -terminate (int result, const char *fmt, ...) -{ - va_list ap; va_start (ap, fmt); vprintf (fmt, ap); va_end (ap); @@ -482,7 +471,7 @@ strpcpy (char *dest, const char *src, const char *str) if (dest == NULL || strlen (dest) < len) dest = realloc (dest, len + 1); if (dest == NULL) - terminate (STATE_UNKNOWN, "failed realloc in strpcpy\n"); + die (STATE_UNKNOWN, "failed realloc in strpcpy\n"); strncpy (dest, src, len); dest[len] = '\0'; @@ -526,7 +515,7 @@ strpcat (char *dest, const char *src, const char *str) dest = realloc (dest, len + l2 + 1); if (dest == NULL) - terminate (STATE_UNKNOWN, "failed malloc in strscat\n"); + die (STATE_UNKNOWN, "failed malloc in strscat\n"); strncpy (dest + len, src, l2); dest[len + l2] = '\0'; |