Date: Sun, 17 Jan 2010 21:00:30 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r202527 - head/lib/libc/gen Message-ID: <201001172100.o0HL0UZv044495@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001172100.o0HL0UZv044495>