about summary refs log tree commit diff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/util.c b/util.c
index 781308f..97b5641 100644
--- a/util.c
+++ b/util.c
@@ -53,7 +53,7 @@ u_exec(char *argstr)
 {
 #define MAXARGLEN 20
 	char	*args[MAXARGLEN], **ap = args;
-	char	**end = &args[MAXARGLEN - 1], *tmp;
+	char	**end = &args[MAXARGLEN - 2], *tmp;
 	char	*s = argstr;
 
 	while (ap < end && (*ap = strsep(&argstr, " \t")) != NULL) {
@@ -92,12 +92,12 @@ u_argv(char * const *argv)
 	char	*p;
 
 	if (argv == 0)
-		return(NULL);
+		return NULL;
 
 	for (i = 0; argv[i]; i++)
 		siz += strlen(argv[i]) + 1;
 	if (siz == 0)
-		return(NULL);
+		return NULL;
 
 	p = xmalloc(siz);
 	strlcpy(p, argv[0], siz);
@@ -105,7 +105,7 @@ u_argv(char * const *argv)
 		strlcat(p, " ", siz);
 		strlcat(p, argv[i], siz);
 	}
-	return(p);
+	return p;
 }
 
 static void