Re: "break;" missing from switch() in libmisc/limits.c
Tomasz Kłoczko <[email protected]> Mon, 5 Sep 2005 19:33:18 +0200 (CEST)
| Newsgroups | gmane.linux.pld.shadow.general |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 5 Sep 2005, Lasse Collin wrote:
> 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
Missing break statement is now commited to CVS tree.
Thank you.
kloczek
--
-----------------------------------------------------------
*Ludzie nie majÂą problemĂłw, tylko sobie sami je stwarzajÂą*
-----------------------------------------------------------
Tomasz KÂłoczko, sys adm @zie.pg.gda.pl|*e-mail: [email protected]*