diff src/peopen.c @ 15:f671821d8222

code beautifying; 0 -> \0 if appropriate
author meillo@marmaro.de
date Thu, 06 Nov 2008 09:18:38 +0100
parents 26e34ae9a3e3
children 3654c502a4df
line wrap: on
line diff
--- a/src/peopen.c	Wed Oct 29 21:21:26 2008 +0100
+++ b/src/peopen.c	Thu Nov 06 09:18:38 2008 +0100
@@ -7,10 +7,9 @@
 #include <unistd.h>
 #include <string.h>
 #include <sys/types.h>
+#include <sysexits.h>
 
 #include "peopen.h"
-#include "sysexits.h"
-
 #include "masqmail.h"
 
 static void
@@ -35,6 +34,7 @@
 	int i = 0;
 
 	arr = (char **) malloc(sizeof(char *) * count);
+	/* FIXME: check return value of malloc() */
 
 	p = cmd;
 	while (*p && i < (count - 1)) {
@@ -43,7 +43,7 @@
 		q = buf;
 		while (*p && !isspace(*p))
 			*q++ = *p++;
-		*q = 0;
+		*q = '\0';
 		arr[i++] = strdup(buf);
 		while (*p && isspace(*p))
 			p++;