Re: [PATCH] linux/signal.h siginit*() optimization

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Fri, 2 Jul 1999 16:24:00 +0200


Tom Leete wrote:
> To be specific: in each of sigfillset(), sigemptyset(), siginitset(),
> and siginitsetinv(), a "default: memset();break;" combination was the
> first case examined. Since the default case is always satisfied,
> memset() was always called.

Incorrect. C switch cases are jump labels not case-by-case tests. Only
one test occurs, at the `switch'. The `default:' label is jumped to
only when none of the other cases match.

Fixing the missing semicolons is still welcome.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/