diff options
Diffstat (limited to 'sys/lib/libsa')
-rw-r--r-- | sys/lib/libsa/ufs.c | 10 | ||||
-rw-r--r-- | sys/lib/libsa/ufs2.c | 8 |
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)); |