diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-08-09 13:36:49 +0000 |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-08-09 13:36:49 +0000 |
commit | 90b45deb4138efb47efbdd98a4aede1aebb47146 (patch) | |
tree | d27a0180ce89542ee546a0b1e958b68a114ea7ce /plugins/check_smtp.c | |
parent | 4784cac1f017a67978c2f3f2af75b161d1ef33c0 (diff) | |
download | monitoring-plugins-90b45deb4138efb47efbdd98a4aede1aebb47146.tar.gz |
more pedantic compiler warnings
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@674 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_smtp.c')
-rw-r--r-- | plugins/check_smtp.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index f7c826b2..c4e427a6 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c @@ -41,8 +41,8 @@ int server_port = SMTP_PORT; char *server_address = NULL; char *server_expect = NULL; int smtp_use_dummycmd = 1; -char *mail_command = "MAIL "; -char *from_arg = " "; +char *mail_command; +char *from_arg; int warning_time = 0; int check_warning_time = FALSE; int critical_time = 0; @@ -60,7 +60,7 @@ main (int argc, char **argv) int sd; double elapsed_time; int result = STATE_UNKNOWN; - char buffer[MAX_INPUT_BUFFER] = ""; + char buffer[MAX_INPUT_BUFFER]; char *from_str = NULL; char *helocmd = NULL; struct timeval tv; @@ -313,7 +313,13 @@ process_arguments (int argc, char **argv) } if (server_expect == NULL) - asprintf (&server_expect, SMTP_EXPECT); + server_expect = strdup (SMTP_EXPECT); + + if (mail_command == NULL) + mail_command = strdup("MAIL "); + + if (from_arg==NULL) + from_arg = strdup(" "); return validate_arguments (); } |