svn commit: r297796 - head/sys/fs/ext2fs

Pedro F. Giffuni pfg at FreeBSD.org
Mon Apr 11 00:12:25 UTC 2016


Author: pfg
Date: Mon Apr 11 00:12:24 2016
New Revision: 297796
URL: https://svnweb.freebsd.org/changeset/base/297796

Log:
  ext2fs: replace 0 with NULL for pointers.
  
  While here do late initialization of ebap, similar as was
  done in UFS.
  
  Found with devel/coccinelle.
  
  MFC after:	2 weeks

Modified:
  head/sys/fs/ext2fs/ext2_alloc.c

Modified: head/sys/fs/ext2fs/ext2_alloc.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_alloc.c	Sun Apr 10 23:47:40 2016	(r297795)
+++ head/sys/fs/ext2fs/ext2_alloc.c	Mon Apr 11 00:12:24 2016	(r297796)
@@ -161,7 +161,7 @@ ext2_reallocblks(struct vop_reallocblks_
 	struct inode *ip;
 	struct vnode *vp;
 	struct buf *sbp, *ebp;
-	uint32_t *bap, *sbap, *ebap = 0;
+	uint32_t *bap, *sbap, *ebap;
 	struct ext2mount *ump;
 	struct cluster_save *buflist;
 	struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp;
@@ -231,6 +231,7 @@ ext2_reallocblks(struct vop_reallocblks_
 	/*
 	 * If the block range spans two block maps, get the second map.
 	 */
+	ebap = NULL;
 	if (end_lvl == 0 || (idp = &end_ap[end_lvl - 1])->in_off + 1 >= len) {
 		ssize = len;
 	} else {


More information about the svn-src-all mailing list