-/* $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 $ */
/*-
}
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();
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) {
{
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));
}
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();
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) {
{
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));