diff options
-rw-r--r-- | usr.sbin/cron/lib/env.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/cron/lib/env.c b/usr.sbin/cron/lib/env.c index eb956a0..71e0398 100644 --- a/usr.sbin/cron/lib/env.c +++ b/usr.sbin/cron/lib/env.c @@ -27,7 +27,7 @@ static const char rcsid[] = char ** env_init() { - register char **p = (char **) malloc(sizeof(char **)); + register char **p = (char **) malloc(sizeof(char *)); if (p) p[0] = NULL; @@ -56,7 +56,7 @@ env_copy(envp) for (count = 0; envp[count] != NULL; count++) ; - p = (char **) malloc((count+1) * sizeof(char **)); /* 1 for the NULL */ + p = (char **) malloc((count+1) * sizeof(char *)); /* 1 for the NULL */ if (p == NULL) { errno = ENOMEM; return NULL; @@ -116,7 +116,7 @@ env_set(envp, envstr) * array. */ p = (char **) realloc((void *) envp, - (unsigned) ((count+1) * sizeof(char **))); + (unsigned) ((count+1) * sizeof(char *))); if (p == NULL) { /* XXX env_free(envp); */ errno = ENOMEM; |