[Pkg-shadow-commits] r1579 - in upstream/trunk: . src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Mon Dec 31 15:27:23 UTC 2007
Author: nekral-guest
Date: 2007-12-31 15:27:23 +0000 (Mon, 31 Dec 2007)
New Revision: 1579
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/chsh.c
Log:
Avoid implicit brackets.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2007-12-31 15:13:39 UTC (rev 1578)
+++ upstream/trunk/ChangeLog 2007-12-31 15:27:23 UTC (rev 1579)
@@ -4,6 +4,7 @@
out of main().
* src/chsh.c: Before pam_end(), the return value of the previous
pam API was already checked. No need to validate it again.
+ * src/chsh.c: Avoid implicit brackets.
2007-12-31 Nicolas François <nicolas.francois at centraliens.net>
Modified: upstream/trunk/src/chsh.c
===================================================================
--- upstream/trunk/src/chsh.c 2007-12-31 15:13:39 UTC (rev 1578)
+++ upstream/trunk/src/chsh.c 2007-12-31 15:27:23 UTC (rev 1579)
@@ -142,8 +142,9 @@
#ifdef HAVE_GETUSERSHELL
setusershell ();
while ((cp = getusershell ())) {
- if (*cp == '#')
+ if (*cp == '#') {
continue;
+ }
if (strcmp (cp, sh) == 0) {
found = 1;
@@ -156,11 +157,13 @@
return 0;
while (fgets (buf, sizeof (buf), fp)) {
- if ((cp = strrchr (buf, '\n')))
+ if ((cp = strrchr (buf, '\n'))) {
*cp = '\0';
+ }
- if (buf[0] == '#')
+ if (buf[0] == '#') {
continue;
+ }
if (strcmp (buf, sh) == 0) {
found = 1;
@@ -499,8 +502,9 @@
* Now get the login shell. Either get it from the password
* file, or use the value from the command line.
*/
- if (!sflg)
+ if (!sflg) {
STRFCPY (loginsh, pw->pw_shell);
+ }
/*
* If the login shell was not set on the command line, let the user
@@ -541,3 +545,4 @@
closelog ();
exit (E_SUCCESS);
}
+
More information about the Pkg-shadow-commits
mailing list