* 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.
+ * src/chsh.c: Avoid assignments in comparisons.
2007-12-31 Nicolas François <nicolas.francois@centraliens.net>
}
endusershell ();
#else
- if ((fp = fopen (SHELLS_FILE, "r")) == (FILE *) 0)
+ fp = fopen (SHELLS_FILE, "r");
+ if (NULL == fp) {
return 0;
+ }
while (fgets (buf, sizeof (buf), fp)) {
- if ((cp = strrchr (buf, '\n'))) {
+ cp = strrchr (buf, '\n');
+ if (NULL != cp) {
*cp = '\0';
}