* libmisc/myname.c: Avoid implicit conversion of pointers / chars
to booleans.
* libmisc/myname.c: Add brackets.
+2008-05-25 Nicolas François <nicolas.francois@centraliens.net>
+
+ * libmisc/myname.c: Avoid assignments in comparisons.
+ * libmisc/myname.c: Avoid implicit conversion of pointers / chars
+ to booleans.
+ * libmisc/myname.c: Add brackets.
+
2008-05-25 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/utmp.c (checkutmp): Change picky argument's type to
* XXX - when running from su, will return the current user (not
* the original user, like getlogin() does). Does this matter?
*/
- if (cp && *cp && (pw = xgetpwnam (cp)) && pw->pw_uid == ruid)
- return pw;
+ if ((NULL !=cp) && ('\0' != *cp)) {
+ pw = xgetpwnam (cp);
+ if ((NULL != pw) && (pw->pw_uid == ruid)) {
+ return pw;
+ }
+ }
return xgetpwuid (ruid);
}