diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-18 14:45:56 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-18 14:45:56 +0000 |
commit | d5808ebf65aa6e6f780343e88c9bc994d2442c3f (patch) | |
tree | 95407140f29906a1684b31a3da3b603a303d1d38 /lib/libstand | |
parent | 7a4b1114b1d0bebc3198b5b91d9e6265e7e81ac2 (diff) | |
download | src-d5808ebf65aa6e6f780343e88c9bc994d2442c3f.tar.gz src-d5808ebf65aa6e6f780343e88c9bc994d2442c3f.zip |
libstand: use NULL instead of zero for pointers.
Notes
Notes:
svn path=/head/; revision=298210
Diffstat (limited to 'lib/libstand')
-rw-r--r-- | lib/libstand/cd9660.c | 6 | ||||
-rw-r--r-- | lib/libstand/nfs.c | 12 | ||||
-rw-r--r-- | lib/libstand/strtol.c | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/libstand/cd9660.c b/lib/libstand/cd9660.c index 09cc7f83f2c7..a730a8e51e34 100644 --- a/lib/libstand/cd9660.c +++ b/lib/libstand/cd9660.c @@ -273,13 +273,13 @@ dirmatch(struct open_file *f, const char *path, struct iso_directory_record *dp, 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; diff --git a/lib/libstand/nfs.c b/lib/libstand/nfs.c index a0b726cde3f3..222b2f50af4d 100644 --- a/lib/libstand/nfs.c +++ b/lib/libstand/nfs.c @@ -511,7 +511,7 @@ nfs_open(const char *upath, struct open_file *f) #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_file *f) 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_file *f) } #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_file *f) bcopy(&nfs_root_node, currfd, sizeof(*currfd)); free(newfd); - newfd = 0; + newfd = NULL; continue; } free(currfd); currfd = newfd; - newfd = 0; + newfd = NULL; } error = 0; diff --git a/lib/libstand/strtol.c b/lib/libstand/strtol.c index ec5daf0bb87a..be82fb1b6730 100644 --- a/lib/libstand/strtol.c +++ b/lib/libstand/strtol.c @@ -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); } |