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@centraliens.net>
#ifdef HAVE_GETUSERSHELL
setusershell ();
while ((cp = getusershell ())) {
- if (*cp == '#')
+ if (*cp == '#') {
continue;
+ }
if (strcmp (cp, sh) == 0) {
found = 1;
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;
* 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
closelog ();
exit (E_SUCCESS);
}
+