"break;" missing from switch() in libmisc/limits.c

Lasse Collin <[email protected]> Mon, 5 Sep 2005 20:21:03 +0300
Newsgroups gmane.linux.pld.shadow.general
Message-ID <[email protected]>
The "case 'a':" doesn't have a break statement. Because of this, setting 
the max address space in /etc/limits will also modify the next limit 
(usually max CPU time). For the reference, below are the lines 206-220 
of limits.c v.1.19.


        while (*pp != '\0')
                switch (*pp++) {
#ifdef RLIMIT_AS
                case 'a':
                case 'A':
                        /* RLIMIT_AS - max address space (KB) */
                        retval |= setrlimit_value (RLIMIT_AS, pp, 1024);
#endif
#ifdef RLIMIT_CPU
                case 't':
                case 'T':
                        /* RLIMIT_CPU - max CPU time (MIN) */
                        retval |= setrlimit_value (RLIMIT_CPU, pp, 60);
                        break;
#endif

-- 
Lasse Collin  |  IRC: Larhzu @ IRCnet & Freenode