diff options
author | bde <bde@FreeBSD.org> | 2003-07-01 12:30:03 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2003-07-01 12:30:03 +0000 |
commit | b060e14e1b2d1925a6b597ce718ee73f002f7036 (patch) | |
tree | 00b74f345a03edeae53d448a0473bf310d8ab290 /lib/libc/gen/exec.c | |
parent | 0ef7485747c068a9d670347636630f4c93f477f9 (diff) | |
download | FreeBSD-src-b060e14e1b2d1925a6b597ce718ee73f002f7036.zip FreeBSD-src-b060e14e1b2d1925a6b597ce718ee73f002f7036.tar.gz |
Fixed some style bugs.
Diffstat (limited to 'lib/libc/gen/exec.c')
-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 3f81a3a..a832bdc 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: |