aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2008-02-08 07:20:46 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:35 -0500
commit756fa92f4d725698ffa4ac1faeb8f4e8cdb6cd95 (patch)
tree383d23fde3e040ac4dabdf0d418e7b04ac5fc1c8
parent48d6d8ff7dca804536298e517298182c4a51c421 (diff)
udf: fix udf_debug macro
udf_debug should be enclosed with do { } while (0) to be safely used in code like below: if (something) udf_debug(); else anything; (Otherwise compiler will not compile it with: "error: expected expression before 'else'") Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Jan Kara <jack@suse.cz> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/udf_fs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/udf_fs.h b/include/linux/udf_fs.h
index 36c684e1b110..c954527a41be 100644
--- a/include/linux/udf_fs.h
+++ b/include/linux/udf_fs.h
@@ -39,11 +39,11 @@
39 39
40#ifdef UDFFS_DEBUG 40#ifdef UDFFS_DEBUG
41#define udf_debug(f, a...) \ 41#define udf_debug(f, a...) \
42 { \ 42 do { \
43 printk (KERN_DEBUG "UDF-fs DEBUG %s:%d:%s: ", \ 43 printk (KERN_DEBUG "UDF-fs DEBUG %s:%d:%s: ", \
44 __FILE__, __LINE__, __FUNCTION__); \ 44 __FILE__, __LINE__, __FUNCTION__); \
45 printk (f, ##a); \ 45 printk (f, ##a); \
46 } 46 } while (0)
47#else 47#else
48#define udf_debug(f, a...) /**/ 48#define udf_debug(f, a...) /**/
49#endif 49#endif