From owner-svn-src-all@FreeBSD.ORG Fri Dec 28 20:44:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A82B9E6; Fri, 28 Dec 2012 20:44:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4E2E28FC08; Fri, 28 Dec 2012 20:44:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBSKiB7g099609; Fri, 28 Dec 2012 20:44:11 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBSKiBUq099608; Fri, 28 Dec 2012 20:44:11 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201212282044.qBSKiBUq099608@svn.freebsd.org> From: Baptiste Daroussin Date: Fri, 28 Dec 2012 20:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244780 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2012 20:44:11 -0000 Author: bapt Date: Fri Dec 28 20:44:10 2012 New Revision: 244780 URL: http://svnweb.freebsd.org/changeset/base/244780 Log: Simplify pointing dst after the end of all the gr_mem pointers in newgr Submitted by: pjd Reviewed by: db Modified: head/lib/libutil/gr_util.c Modified: head/lib/libutil/gr_util.c ============================================================================== --- head/lib/libutil/gr_util.c Fri Dec 28 20:30:04 2012 (r244779) +++ head/lib/libutil/gr_util.c Fri Dec 28 20:44:10 2012 (r244780) @@ -456,8 +456,7 @@ gr_dup(const struct group *gr) else newgr->gr_mem = NULL; /* point dst after the end of all the gr_mem pointers in newgr */ - dst = (char *)newgr + sizeof(struct group) + - (num_mem + 1) * sizeof(*gr->gr_mem); + dst = (char *)&newgr->gr_mem[num_mem + 1]; if (gr->gr_name != NULL) { newgr->gr_name = dst; dst = stpcpy(dst, gr->gr_name) + 1;