diff options
author | Toomas Soome <tsoome@me.com> | 2016-11-09 00:11:51 +0200 |
---|---|---|
committer | Dan McDonald <danmcd@omniti.com> | 2016-11-08 23:50:24 -0500 |
commit | 00b631909040bb219a21436e55f74fc367c62176 (patch) | |
tree | db2b01a5e34adec53a2be53840c02c1bee29f5e2 /usr | |
parent | d72bf951ba184d757e3eb6a9483f909b29893197 (diff) | |
download | illumos-joyent-00b631909040bb219a21436e55f74fc367c62176.tar.gz |
7557 libstand: use NULL instead of zero for pointers.
Reviewed by: Andrew Stormont <astormont@racktopsystems.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Diffstat (limited to 'usr')
-rw-r--r-- | usr/src/boot/lib/libstand/cd9660.c | 6 | ||||
-rw-r--r-- | usr/src/boot/lib/libstand/nfs.c | 12 | ||||
-rw-r--r-- | usr/src/boot/lib/libstand/strtol.c | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/usr/src/boot/lib/libstand/cd9660.c b/usr/src/boot/lib/libstand/cd9660.c index e03f56eef4..c28a8b222d 100644 --- a/usr/src/boot/lib/libstand/cd9660.c +++ b/usr/src/boot/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 */ @@ -421,7 +421,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/usr/src/boot/lib/libstand/nfs.c b/usr/src/boot/lib/libstand/nfs.c index a0b726cde3..222b2f50af 100644 --- a/usr/src/boot/lib/libstand/nfs.c +++ b/usr/src/boot/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/usr/src/boot/lib/libstand/strtol.c b/usr/src/boot/lib/libstand/strtol.c index ec5daf0bb8..be82fb1b67 100644 --- a/usr/src/boot/lib/libstand/strtol.c +++ b/usr/src/boot/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); } |