Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Apr 2016 00:51:14 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r298557 - stable/10/sys/fs/ext2fs
Message-ID:  <201604250051.u3P0pEmT028200@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Mon Apr 25 00:51:13 2016
New Revision: 298557
URL: https://svnweb.freebsd.org/changeset/base/298557

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

Modified:
  stable/10/sys/fs/ext2fs/ext2_alloc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/ext2fs/ext2_alloc.c
==============================================================================
--- stable/10/sys/fs/ext2fs/ext2_alloc.c	Mon Apr 25 00:41:23 2016	(r298556)
+++ stable/10/sys/fs/ext2fs/ext2_alloc.c	Mon Apr 25 00:51:13 2016	(r298557)
@@ -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 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604250051.u3P0pEmT028200>