summaryrefslogtreecommitdiff
path: root/sys/lib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-07-22 18:03:04 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-07-22 18:03:04 +0000
commit4a2a792d783efbf2e4198755dce21adedd9d959a (patch)
treeed3f77e505bd01932cbe49b5272e7b95a17a71fc /sys/lib
parentf5a8385b9a8756547a63181be7e83a68b7c662e6 (diff)
use NULL instead of (foo *)0; Kent R. Spillner
Diffstat (limited to 'sys/lib')
-rw-r--r--sys/lib/libsa/ufs.c10
-rw-r--r--sys/lib/libsa/ufs2.c8
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/lib/libsa/ufs.c b/sys/lib/libsa/ufs.c
index 7dbb172557e..7516651e218 100644
--- a/sys/lib/libsa/ufs.c
+++ b/sys/lib/libsa/ufs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs.c,v 1.23 2014/07/22 16:51:00 deraadt Exp $ */
+/* $OpenBSD: ufs.c,v 1.24 2014/07/22 18:03:03 deraadt Exp $ */
/* $NetBSD: ufs.c,v 1.16 1996/09/30 16:01:22 ws Exp $ */
/*-
@@ -221,7 +221,7 @@ block_map(struct open_file *f, daddr32_t file_block, daddr32_t *disk_block_p)
}
if (fp->f_blkno[level] != ind_block_num) {
- if (fp->f_blk[level] == (char *)0)
+ if (fp->f_blk[level] == NULL)
fp->f_blk[level] =
alloc(fs->fs_bsize);
twiddle();
@@ -273,7 +273,7 @@ buf_read_file(struct open_file *f, char **buf_p, size_t *size_p)
if (rc)
return (rc);
- if (fp->f_buf == (char *)0)
+ if (fp->f_buf == NULL)
fp->f_buf = alloc(fs->fs_bsize);
if (disk_block == 0) {
@@ -538,8 +538,8 @@ ufs_close(struct open_file *f)
{
struct file *fp = (struct file *)f->f_fsdata;
- f->f_fsdata = (void *)0;
- if (fp == (struct file *)0)
+ f->f_fsdata = NULL;
+ if (fp == NULL)
return (0);
return (ufs_close_internal(fp));
diff --git a/sys/lib/libsa/ufs2.c b/sys/lib/libsa/ufs2.c
index b3623fff036..336f9ee0171 100644
--- a/sys/lib/libsa/ufs2.c
+++ b/sys/lib/libsa/ufs2.c
@@ -217,7 +217,7 @@ block_map(struct open_file *f, daddr_t file_block, daddr_t *disk_block_p)
}
if (fp->f_blkno[level] != ind_block_num) {
- if (fp->f_blk[level] == (char *)0)
+ if (fp->f_blk[level] == NULL)
fp->f_blk[level] =
alloc(fs->fs_bsize);
twiddle();
@@ -269,7 +269,7 @@ buf_read_file(struct open_file *f, char **buf_p, size_t *size_p)
if (rc)
return (rc);
- if (fp->f_buf == (char *)0)
+ if (fp->f_buf == NULL)
fp->f_buf = alloc(fs->fs_bsize);
if (disk_block == 0) {
@@ -534,8 +534,8 @@ ufs2_close(struct open_file *f)
{
struct file *fp = (struct file *)f->f_fsdata;
- f->f_fsdata = (void *)0;
- if (fp == (struct file *)0)
+ f->f_fsdata = NULL;
+ if (fp == NULL)
return (0);
return (ufs2_close_internal(fp));