From owner-freebsd-fs@FreeBSD.ORG Tue Jan 3 19:10:12 2012 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 924E51065675 for ; Tue, 3 Jan 2012 19:10:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 67A768FC0C for ; Tue, 3 Jan 2012 19:10:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q03JAClv012366 for ; Tue, 3 Jan 2012 19:10:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q03JAClo012365; Tue, 3 Jan 2012 19:10:12 GMT (envelope-from gnats) Date: Tue, 3 Jan 2012 19:10:12 GMT Message-Id: <201201031910.q03JAClo012365@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/142401: commit references a PR X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2012 19:10:12 -0000 The following reply was made to PR kern/142401; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/142401: commit references a PR Date: Tue, 3 Jan 2012 19:09:11 +0000 (UTC) Author: pfg Date: Tue Jan 3 19:09:01 2012 New Revision: 229407 URL: http://svn.freebsd.org/changeset/base/229407 Log: Minor cleanups to ntfs code bzero -> memset rename variables to avoid shadowing. PR: 142401 Obtained from: NetBSD Approved by jhb (mentor) Modified: head/sys/fs/ntfs/ntfs_compr.c head/sys/fs/ntfs/ntfs_subr.c Modified: head/sys/fs/ntfs/ntfs_compr.c ============================================================================== --- head/sys/fs/ntfs/ntfs_compr.c Tue Jan 3 19:01:54 2012 (r229406) +++ head/sys/fs/ntfs/ntfs_compr.c Tue Jan 3 19:09:01 2012 (r229407) @@ -42,7 +42,7 @@ int ntfs_uncompblock( - u_int8_t * buf, + u_int8_t * dbuf, u_int8_t * cbuf) { u_int32_t ctag; @@ -60,8 +60,8 @@ ntfs_uncompblock( dprintf(("ntfs_uncompblock: len: %x instead of %d\n", len, 0xfff)); } - memcpy(buf, cbuf + 2, len + 1); - bzero(buf + len + 1, NTFS_COMPBLOCK_SIZE - 1 - len); + memcpy(dbuf, cbuf + 2, len + 1); + memset(dbuf + len + 1, 0, NTFS_COMPBLOCK_SIZE - 1 - len); return len + 3; } cpos = 2; @@ -78,12 +78,12 @@ ntfs_uncompblock( boff = -1 - (GET_UINT16(cbuf + cpos) >> dshift); blen = 3 + (GET_UINT16(cbuf + cpos) & lmask); for (j = 0; (j < blen) && (pos < NTFS_COMPBLOCK_SIZE); j++) { - buf[pos] = buf[pos + boff]; + dbuf[pos] = dbuf[pos + boff]; pos++; } cpos += 2; } else { - buf[pos++] = cbuf[cpos++]; + dbuf[pos++] = cbuf[cpos++]; } ctag >>= 1; } Modified: head/sys/fs/ntfs/ntfs_subr.c ============================================================================== --- head/sys/fs/ntfs/ntfs_subr.c Tue Jan 3 19:01:54 2012 (r229406) +++ head/sys/fs/ntfs/ntfs_subr.c Tue Jan 3 19:09:01 2012 (r229407) @@ -1636,7 +1636,7 @@ ntfs_readntvattr_plain( for(; remains; remains--) uiomove("", 1, uio); } else - bzero(data, tocopy); + memset(data, 0, tocopy); data = data + tocopy; } cnt++; @@ -1783,7 +1783,7 @@ ntfs_readattr( uiomove("", 1, uio); } else - bzero(data, tocopy); + memset(data, 0, tocopy); } else { error = ntfs_uncompunit(ntmp, uup, cup); if (error) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"