diff options
author | kstailey <kstailey@cvs.openbsd.org> | 1997-06-18 22:42:50 +0000 |
---|---|---|
committer | kstailey <kstailey@cvs.openbsd.org> | 1997-06-18 22:42:50 +0000 |
commit | c8708ed93617f5d278f4f7faf294a6e7c57227df (patch) | |
tree | 83832809b6ff198d789d720827ee338c50df8b37 /bin/ksh/path.c | |
parent | e37d7f641aedb36d7e29530bb5d9c2fe398d1407 (diff) |
(foo *)0 -> NULL
Diffstat (limited to 'bin/ksh/path.c')
-rw-r--r-- | bin/ksh/path.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/bin/ksh/path.c b/bin/ksh/path.c index 5242ab42cb4..4476964258a 100644 --- a/bin/ksh/path.c +++ b/bin/ksh/path.c @@ -1,4 +1,4 @@ -/* $OpenBSD: path.c,v 1.1 1996/08/14 06:19:11 downsj Exp $ */ +/* $OpenBSD: path.c,v 1.2 1997/06/18 22:42:42 kstailey Exp $ */ #include "sh.h" #include "ksh_stat.h" @@ -14,8 +14,11 @@ /* * $Log: path.c,v $ - * Revision 1.1 1996/08/14 06:19:11 downsj - * Initial revision + * Revision 1.2 1997/06/18 22:42:42 kstailey + * (foo *)0 -> NULL + * + * Revision 1.1.1.1 1996/08/14 06:19:11 downsj + * Import pdksh 5.2.7. * * Revision 1.2 1994/05/19 18:32:40 michael * Merge complete, stdio replaced, various fixes. (pre autoconf) @@ -108,7 +111,7 @@ make_path(cwd, file, cdpathp, xsp, phys_pathp) for (pend = plist; *pend && *pend != PATHSEP; pend++) ; plen = pend - plist; - *cdpathp = *pend ? ++pend : (char *) 0; + *cdpathp = *pend ? ++pend : NULL; } if ((use_cdpath == 0 || !plen || ISRELPATH(plist)) @@ -137,7 +140,7 @@ make_path(cwd, file, cdpathp, xsp, phys_pathp) memcpy(xp, file, len); if (!use_cdpath) - *cdpathp = (char *) 0; + *cdpathp = NULL; return rval; } @@ -230,7 +233,7 @@ set_current_wd(path) int len; char *p = path; - if (!p && !(p = ksh_get_wd((char *) 0, 0))) + if (!p && !(p = ksh_get_wd(NULL, 0))) p = null; len = strlen(p) + 1; @@ -255,7 +258,7 @@ get_phys_path(path) xp = do_phys_path(&xs, xp, path); if (!xp) - return (char *) 0; + return NULL; if (Xlength(xs, xp) == 0) Xput(xs, xp, DIRSEP); @@ -304,7 +307,7 @@ do_phys_path(xsp, xp, path) if (llen < 0) { /* EINVAL means it wasn't a symlink... */ if (errno != EINVAL) - return (char *) 0; + return NULL; continue; } lbuf[llen] = '\0'; @@ -313,7 +316,7 @@ do_phys_path(xsp, xp, path) xp = ISABSPATH(lbuf) ? Xstring(*xsp, xp) : Xrestpos(*xsp, xp, savepos); if (!(xp = do_phys_path(xsp, xp, lbuf))) - return (char *) 0; + return NULL; } return xp; } |