From 9e17dab6c3e4b4e7142f3ea5b2a60fcd488dc709 Mon Sep 17 00:00:00 2001 From: Karl DeBisschop Date: Thu, 7 Aug 2003 11:51:12 +0000 Subject: 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 --- plugins/utils.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'plugins/utils.c') diff --git a/plugins/utils.c b/plugins/utils.c index 5f770a1f..959541bf 100644 --- a/plugins/utils.c +++ b/plugins/utils.c @@ -130,17 +130,6 @@ state_text (int result) 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); @@ -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'; -- cgit v1.2.3