From owner-svn-soc-all@FreeBSD.ORG Sun Jun 5 16:19:20 2011 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 9FB191065673 for ; Sun, 5 Jun 2011 16:19:18 +0000 (UTC) (envelope-from gk@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Sun, 05 Jun 2011 16:19:18 +0000 Date: Sun, 05 Jun 2011 16:19:18 +0000 From: gk@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20110605161918.9FB191065673@hub.freebsd.org> Cc: Subject: socsvn commit: r222836 - soc2011/gk/ino64-head/usr.sbin/lpr/common_source X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jun 2011 16:19:20 -0000 Author: gk Date: Sun Jun 5 16:19:18 2011 New Revision: 222836 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=222836 Log: Use dirfd() instead of dirp->dd_fd Modified: soc2011/gk/ino64-head/usr.sbin/lpr/common_source/common.c Modified: soc2011/gk/ino64-head/usr.sbin/lpr/common_source/common.c ============================================================================== --- soc2011/gk/ino64-head/usr.sbin/lpr/common_source/common.c Sun Jun 5 16:19:08 2011 (r222835) +++ soc2011/gk/ino64-head/usr.sbin/lpr/common_source/common.c Sun Jun 5 16:19:18 2011 (r222836) @@ -130,7 +130,7 @@ seteuid(uid); return (-1); } - if (fstat(dirp->dd_fd, &stbuf) < 0) + if (fstat(dirfd(dirp), &stbuf) < 0) goto errdone; seteuid(uid);