Skip to content

Commit

Permalink
The default CONFIG_BUG=n version of BUG() should have an empty do...w…
Browse files Browse the repository at this point in the history
…hile

The default CONFIG_BUG=n version of BUG() should incorporate an empty a
do...while statement to avoid compilation weirdness.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
David Howells authored and Linus Torvalds committed Apr 15, 2009
1 parent 616df13 commit da60682
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-generic/bug.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ extern void warn_slowpath(const char *file, const int line,

#else /* !CONFIG_BUG */
#ifndef HAVE_ARCH_BUG
#define BUG()
#define BUG() do {} while(0)
#endif

#ifndef HAVE_ARCH_BUG_ON
Expand Down

0 comments on commit da60682

Please sign in to comment.