Date: Mon, 18 Apr 2016 14:45:56 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298210 - head/lib/libstand Message-ID: <201604181445.u3IEjuqE094545@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Mon Apr 18 14:45:56 2016 New Revision: 298210 URL: https://svnweb.freebsd.org/changeset/base/298210 Log: libstand: use NULL instead of zero for pointers. Modified: head/lib/libstand/cd9660.c head/lib/libstand/nfs.c head/lib/libstand/strtol.c Modified: head/lib/libstand/cd9660.c ============================================================================== --- head/lib/libstand/cd9660.c Mon Apr 18 14:44:01 2016 (r298209) +++ head/lib/libstand/cd9660.c Mon Apr 18 14:45:56 2016 (r298210) @@ -273,13 +273,13 @@ dirmatch(struct open_file *f, const char static int cd9660_open(const char *path, struct open_file *f) { - struct file *fp = 0; + struct file *fp = NULL; void *buf; struct iso_primary_descriptor *vd; size_t buf_size, read, dsize, off; daddr_t bno, boff; struct iso_directory_record rec; - struct iso_directory_record *dp = 0; + struct iso_directory_record *dp = NULL; int rc, first, use_rrip, lenskip; /* First find the volume descriptor */ @@ -415,7 +415,7 @@ cd9660_close(struct open_file *f) { struct file *fp = (struct file *)f->f_fsdata; - f->f_fsdata = 0; + f->f_fsdata = NULL; free(fp); return 0; Modified: head/lib/libstand/nfs.c ============================================================================== --- head/lib/libstand/nfs.c Mon Apr 18 14:44:01 2016 (r298209) +++ head/lib/libstand/nfs.c Mon Apr 18 14:45:56 2016 (r298210) @@ -511,7 +511,7 @@ nfs_open(const char *upath, struct open_ #ifndef NFS_NOSYMLINK bcopy(&nfs_root_node, currfd, sizeof(*currfd)); - newfd = 0; + newfd = NULL; cp = path = strdup(upath); if (path == NULL) { @@ -593,14 +593,14 @@ nfs_open(const char *upath, struct open_ bcopy(&nfs_root_node, currfd, sizeof(*currfd)); free(newfd); - newfd = 0; + newfd = NULL; continue; } free(currfd); currfd = newfd; - newfd = 0; + newfd = NULL; } error = 0; @@ -1155,7 +1155,7 @@ nfs_open(const char *upath, struct open_ } #ifndef NFS_NOSYMLINK bcopy(&nfs_root_node, currfd, sizeof(*currfd)); - newfd = 0; + newfd = NULL; cp = path = strdup(upath); if (path == NULL) { @@ -1241,14 +1241,14 @@ nfs_open(const char *upath, struct open_ bcopy(&nfs_root_node, currfd, sizeof(*currfd)); free(newfd); - newfd = 0; + newfd = NULL; continue; } free(currfd); currfd = newfd; - newfd = 0; + newfd = NULL; } error = 0; Modified: head/lib/libstand/strtol.c ============================================================================== --- head/lib/libstand/strtol.c Mon Apr 18 14:44:01 2016 (r298209) +++ head/lib/libstand/strtol.c Mon Apr 18 14:45:56 2016 (r298210) @@ -126,7 +126,7 @@ strtol(nptr, endptr, base) errno = ERANGE; } else if (neg) acc = -acc; - if (endptr != 0) + if (endptr != NULL) *endptr = (char *)(any ? s - 1 : nptr); return (acc); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604181445.u3IEjuqE094545>