From owner-svn-src-head@freebsd.org Mon Apr 11 00:12:25 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AC77B0A20C; Mon, 11 Apr 2016 00:12:25 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C0371638; Mon, 11 Apr 2016 00:12:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3B0COr9012154; Mon, 11 Apr 2016 00:12:24 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3B0COl0012153; Mon, 11 Apr 2016 00:12:24 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201604110012.u3B0COl0012153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 11 Apr 2016 00:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297796 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 00:12:25 -0000 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 {