summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-18 14:45:56 +0000
committerpfg <pfg@FreeBSD.org>2016-04-18 14:45:56 +0000
commit69f0978333674cf5ecc98045212b50a953d294ae (patch)
tree95407140f29906a1684b31a3da3b603a303d1d38
parent889ed0c7e47e4745ee31554d05b38302364b6b8a (diff)
downloadFreeBSD-src-69f0978333674cf5ecc98045212b50a953d294ae.zip
FreeBSD-src-69f0978333674cf5ecc98045212b50a953d294ae.tar.gz
libstand: use NULL instead of zero for pointers.
-rw-r--r--lib/libstand/cd9660.c6
-rw-r--r--lib/libstand/nfs.c12
-rw-r--r--lib/libstand/strtol.c2
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/libstand/cd9660.c b/lib/libstand/cd9660.c
index 09cc7f8..a730a8e 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 a0b726c..222b2f5 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 ec5daf0..be82fb1 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);
}
OpenPOWER on IntegriCloud