svn commit: r202527 - head/lib/libc/gen
Ed Schouten
ed at FreeBSD.org
Sun Jan 17 21:00:30 UTC 2010
Author: ed
Date: Sun Jan 17 21:00:29 2010
New Revision: 202527
URL: http://svn.freebsd.org/changeset/base/202527
Log:
Add forgotten break; keyword to getutxid().
We should not fall through to the ut_id comparison. Only ut_type should
be compared when using OLD_TIME, NEW_TIME, BOOT_TIME or SHUTDOWN_TIME.
Modified:
head/lib/libc/gen/getutxent.c
Modified: head/lib/libc/gen/getutxent.c
==============================================================================
--- head/lib/libc/gen/getutxent.c Sun Jan 17 21:00:28 2010 (r202526)
+++ head/lib/libc/gen/getutxent.c Sun Jan 17 21:00:29 2010 (r202527)
@@ -164,6 +164,7 @@ getutxid(const struct utmpx *id)
case SHUTDOWN_TIME:
if (fu->fu_type == id->ut_type)
goto found;
+ break;
case USER_PROCESS:
case INIT_PROCESS:
case LOGIN_PROCESS:
@@ -177,6 +178,7 @@ getutxid(const struct utmpx *id)
MIN(sizeof fu->fu_id, sizeof id->ut_id)) == 0)
goto found;
}
+ break;
}
}
More information about the svn-src-head
mailing list