[Pkg-shadow-commits] r2030 - in upstream/trunk: . libmisc
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Sun May 25 22:49:42 UTC 2008
Author: nekral-guest
Date: 2008-05-25 22:49:41 +0000 (Sun, 25 May 2008)
New Revision: 2030
Modified:
upstream/trunk/ChangeLog
upstream/trunk/libmisc/rlogin.c
Log:
* libmisc/rlogin.c: Avoid assignments in comparisons.
* libmisc/rlogin.c: Avoid implicit conversion of integers to booleans.
* libmisc/rlogin.c: Add brackets.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-05-25 22:44:44 UTC (rev 2029)
+++ upstream/trunk/ChangeLog 2008-05-25 22:49:41 UTC (rev 2030)
@@ -1,5 +1,12 @@
2008-05-26 Nicolas François <nicolas.francois at centraliens.net>
+ * libmisc/rlogin.c: Avoid assignments in comparisons.
+ * libmisc/rlogin.c: Avoid implicit conversion of integers to
+ booleans.
+ * libmisc/rlogin.c: Add brackets.
+
+2008-05-26 Nicolas François <nicolas.francois at centraliens.net>
+
* libmisc/failure.c (failcheck): The failed argument is a bool.
* libmisc/failure.c (too_many_failures): too_many_failures returns
a bool.
Modified: upstream/trunk/libmisc/rlogin.c
===================================================================
--- upstream/trunk/libmisc/rlogin.c 2008-05-25 22:44:44 UTC (rev 2029)
+++ upstream/trunk/libmisc/rlogin.c 2008-05-25 22:49:41 UTC (rev 2030)
@@ -141,8 +141,10 @@
if ((cp = strchr (term, '/'))) {
*cp++ = '\0';
- if (!(remote_speed = atoi (cp)))
+ remote_speed = atoi (cp);
+ if (0 == remote_speed) {
remote_speed = 9600;
+ }
}
for (i = 0; speed_table[i].spd_baud != remote_speed &&
speed_table[i].spd_name != -1; i++);
@@ -165,8 +167,10 @@
#endif
STTY (0, &termio);
- if (!(pwd = getpwnam (name))) /* local, no need for xgetpwnam */
+ pwd = getpwnam (name); /* local, no need for xgetpwnam */
+ if (NULL == pwd) {
return 0;
+ }
/*
* ruserok() returns 0 for success on modern systems, and 1 on
More information about the Pkg-shadow-commits
mailing list