masqmail-0.2

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 diff
     1.1 --- a/src/peopen.c	Wed Oct 29 21:21:26 2008 +0100
     1.2 +++ b/src/peopen.c	Thu Nov 06 09:18:38 2008 +0100
     1.3 @@ -7,10 +7,9 @@
     1.4  #include <unistd.h>
     1.5  #include <string.h>
     1.6  #include <sys/types.h>
     1.7 +#include <sysexits.h>
     1.8  
     1.9  #include "peopen.h"
    1.10 -#include "sysexits.h"
    1.11 -
    1.12  #include "masqmail.h"
    1.13  
    1.14  static void
    1.15 @@ -35,6 +34,7 @@
    1.16  	int i = 0;
    1.17  
    1.18  	arr = (char **) malloc(sizeof(char *) * count);
    1.19 +	/* FIXME: check return value of malloc() */
    1.20  
    1.21  	p = cmd;
    1.22  	while (*p && i < (count - 1)) {
    1.23 @@ -43,7 +43,7 @@
    1.24  		q = buf;
    1.25  		while (*p && !isspace(*p))
    1.26  			*q++ = *p++;
    1.27 -		*q = 0;
    1.28 +		*q = '\0';
    1.29  		arr[i++] = strdup(buf);
    1.30  		while (*p && isspace(*p))
    1.31  			p++;