Date: Thu, 1 May 2014 09:30:01 GMT From: "Matthew D.Fuller" <fullermd@over-yonder.net> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/189173: [PATCH] Minor cosmetic cleanup of usr.sbin/pw/pwupd.c Message-ID: <201405010930.s419U1ko057097@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/189173; it has been noted by GNATS.
From: "Matthew D.Fuller" <fullermd@over-yonder.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Re: bin/189173: [PATCH] Minor cosmetic cleanup of usr.sbin/pw/pwupd.c
Date: Thu, 1 May 2014 04:19:51 -0500
Actually the #define's related to this can go away too; use of
HAVE_PWDB_C is removed by this, and HAVE_PWDB_U is unused since
r242349.
Index: pwupd.c
===================================================================
--- pwupd.c (revision 264991)
+++ pwupd.c (working copy)
@@ -45,9 +45,6 @@
#include "pwupd.h"
-#define HAVE_PWDB_C 1
-#define HAVE_PWDB_U 1
-
static char pathpwd[] = _PATH_PWD;
static char * pwpath = pathpwd;
@@ -114,20 +111,15 @@
/*
* First, let's check the see if the database is alright
- * Note: -C is only available in FreeBSD 2.2 and above
*/
-#ifdef HAVE_PWDB_C
rc = pwdb("-C", (char *)NULL); /* Check only */
if (rc == 0) {
-#else
- { /* No -C */
-#endif
int pfd, tfd;
struct passwd *pw = NULL;
struct passwd *old_pw = NULL;
- if (pwd != NULL)
- pw = pw_dup(pwd);
+ if (pwd != NULL)
+ pw = pw_dup(pwd);
if (user != NULL)
old_pw = GETPWNAM(user);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405010930.s419U1ko057097>
