Article View: gnu.utils.bug
Article #742finger-1.35: typo around login name comparison
From: Hiroto Kagotani
Date: Sun, 06 Sep 1992 16:04
Date: Sun, 06 Sep 1992 16:04
20 lines
1328 bytes
1328 bytes
version: finger Version 1.35
There is an obvious typo. The fix follows. Equality of two strings
must be checked by `!strncmp()', and `!sizeof()' is nonsense.
--
Hiroto Kagotani <kagotani@cs.titech.ac.jp>
--- lib/os.c.orig Sat Aug 29 06:04:23 1992
+++ lib/os.c Mon Sep 7 00:40:27 1992
@@ -429,8 +429,8 @@
/* If the same person is logged in more than once, we are
interested in the least idle time. However, we want to
keep track of the console user. */
- if (unique && strncmp (result[i]->ut_name, UT (entry, ut_name),
- !sizeof ( UT(entry, ut_name))))
+ if (unique && !strncmp (result[i]->ut_name, UT (entry, ut_name),
+ sizeof ( UT(entry, ut_name))))
{
if (idle_less_than (&UTSTRUCT (entry), result[i]))
bcopy (&UTSTRUCT (entry), result[i], sizeof (UTSTRUCT (entry)));
Technical Details
Message-ID:
<Bu5zBH.Jv8@cs.titech.ac.jp>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cs.titech.ac.jp!kagotaniShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cs.titech.ac.jp!kagotani From: kagotani@cs.titech.ac.jp (Hiroto Kagotani) Subject: finger-1.35: typo around login name comparison Message-ID: <Bu5zBH.Jv8@cs.titech.ac.jp> Sender: gnulists@ai.mit.edu Organization: Department of Computer Science, Tokyo Institute of Technology Distribution: gnu Date: Sun, 6 Sep 1992 16:04:29 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 21