Minor compiler warning bug fix for OpenBSD systems.
authorMichael Rash <mbr@cipherdyne.org>
Sun, 25 Mar 2012 00:34:56 +0000 (20:34 -0400)
committerMichael Rash <mbr@cipherdyne.org>
Sun, 25 Mar 2012 00:34:56 +0000 (20:34 -0400)
Compiling psad *.c files on OpenBSD issued the following warning before this fix:

/usr/bin/gcc -Wall -O psadwatchd.c psad_funcs.c strlcpy.c strlcat.c -o psadwatchd
psad_funcs.c: In function 'send_alert_email':
psad_funcs.c:325: warning: missing sentinel in function call

psad_funcs.c

index 2d0c275..4feca1f 100644 (file)
@@ -321,7 +321,7 @@ void send_alert_email(const char *shCmd, const char *mailCmd,
     else if (child_pid > 0)
         wait(NULL);  /* mail better work */
     else
-        execle(shCmd, shCmd, "-c", mail_line, NULL, NULL);  /* don't use env */
+        execle(shCmd, shCmd, "-c", mail_line, (char *)NULL, (char *)NULL);  /* don't use env */
     return;
 }