summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2010-01-17 21:00:29 +0000
committered <ed@FreeBSD.org>2010-01-17 21:00:29 +0000
commitc3852c9e0e86dccecc5163b3ea19764f1afcf5cb (patch)
tree0d8c2f53132657c480459fc01d15ba2dc1ad438e /lib/libc/gen
parent5aaf03563a1c2dbe84b8801d89df0650ed6b4391 (diff)
downloadFreeBSD-src-c3852c9e0e86dccecc5163b3ea19764f1afcf5cb.zip
FreeBSD-src-c3852c9e0e86dccecc5163b3ea19764f1afcf5cb.tar.gz
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.
Diffstat (limited to 'lib/libc/gen')
-rw-r--r--lib/libc/gen/getutxent.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/gen/getutxent.c b/lib/libc/gen/getutxent.c
index 13efac0..08b120bae 100644
--- a/lib/libc/gen/getutxent.c
+++ b/lib/libc/gen/getutxent.c
@@ -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;
}
}
OpenPOWER on IntegriCloud