diff options
author | Bruce Evans <bde@FreeBSD.org> | 2003-07-01 12:30:03 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 2003-07-01 12:30:03 +0000 |
commit | 270f6e44dbc177229507c35ea1401af412850624 (patch) | |
tree | 00b74f345a03edeae53d448a0473bf310d8ab290 /lib/libc/gen | |
parent | a3d6b3e7d782f9e3b33b107537c7bf369f84f19e (diff) | |
download | src-270f6e44dbc177229507c35ea1401af412850624.tar.gz src-270f6e44dbc177229507c35ea1401af412850624.zip |
Fixed some style bugs.
Notes
Notes:
svn path=/head/; revision=117111
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/exec.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c index 3f81a3a5a4ab..a832bdc7c0cf 100644 --- a/lib/libc/gen/exec.c +++ b/lib/libc/gen/exec.c @@ -142,14 +142,15 @@ execv(name, argv) } int -execvp(const char *name, char *const *argv) +execvp(const char *name, char * const *argv) { const char *path; /* Get the path we're searching. */ - if (!(path = getenv("PATH"))) + if ((path = getenv("PATH")) == NULL) path = _PATH_DEFPATH; - return(execvP(name,path,argv)); + + return (execvP(name, path, argv)); } int @@ -187,12 +188,12 @@ execvP(name, path, argv) return (-1); } strcpy(cur, path); - while ( (p = strsep(&cur, ":")) ) { + while ((p = strsep(&cur, ":")) != NULL) { /* * It's a SHELL path -- double, leading and trailing colons * mean the current directory. */ - if (!*p) { + if (*p == '\0') { p = "."; lp = 1; } else @@ -217,7 +218,7 @@ execvP(name, path, argv) buf[lp + ln + 1] = '\0'; retry: (void)_execve(bp, argv, environ); - switch(errno) { + switch (errno) { case E2BIG: goto done; case ELOOP: |