lkml.org 
[lkml]   [1999]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] linux/signal.h siginit*() optimization
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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.034 / U:1.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site