From owner-svn-src-head@FreeBSD.ORG Fri Feb 25 23:05:36 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12F5D106566B; Fri, 25 Feb 2011 23:05:36 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 025A98FC21; Fri, 25 Feb 2011 23:05:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1PN5ZZs016962; Fri, 25 Feb 2011 23:05:35 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1PN5Zf4016960; Fri, 25 Feb 2011 23:05:35 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201102252305.p1PN5Zf4016960@svn.freebsd.org> From: Ed Schouten Date: Fri, 25 Feb 2011 23:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219045 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 25 Feb 2011 23:05:36 -0000 Author: ed Date: Fri Feb 25 23:05:35 2011 New Revision: 219045 URL: http://svn.freebsd.org/changeset/base/219045 Log: Fix style(9) issues in pututxline(3). Also, make sure to initialize the `ret' variable properly. Reported by: Cedric Jonas Patch by: Garrett Cooper Modified: head/lib/libc/gen/pututxline.c Modified: head/lib/libc/gen/pututxline.c ============================================================================== --- head/lib/libc/gen/pututxline.c Fri Feb 25 22:14:12 2011 (r219044) +++ head/lib/libc/gen/pututxline.c Fri Feb 25 23:05:35 2011 (r219045) @@ -43,8 +43,8 @@ __FBSDID("$FreeBSD$"); static FILE * futx_open(const char *file) { - struct stat sb; FILE *fp; + struct stat sb; int fd; fd = _open(file, O_CREAT|O_RDWR|O_EXLOCK, 0644); @@ -69,11 +69,14 @@ futx_open(const char *file) static int utx_active_add(const struct futx *fu) { - struct futx fe; FILE *fp; - off_t partial = -1; + struct futx fe; + off_t partial; int error, ret; + partial = -1; + ret = 0; + /* * Register user login sessions. Overwrite entries of sessions * that have already been terminated. @@ -132,8 +135,8 @@ exact: static int utx_active_remove(struct futx *fu) { - struct futx fe; FILE *fp; + struct futx fe; int error, ret; /* @@ -266,7 +269,9 @@ struct utmpx * pututxline(const struct utmpx *utmpx) { struct futx fu; - int bad = 0; + int bad; + + bad = 0; utx_to_futx(utmpx, &fu);