Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=756fa92f4d725698ffa4ac1faeb8f4e8cdb6cd95
Commit:     756fa92f4d725698ffa4ac1faeb8f4e8cdb6cd95
Parent:     48d6d8ff7dca804536298e517298182c4a51c421
Author:     Marcin Slusarz <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 8 04:20:46 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Feb 8 09:22:35 2008 -0800

    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 <[EMAIL PROTECTED]>
    Cc: Jan Kara <[EMAIL PROTECTED]>
    Cc: Christoph Hellwig <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/linux/udf_fs.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/udf_fs.h b/include/linux/udf_fs.h
index 36c684e..c954527 100644
--- a/include/linux/udf_fs.h
+++ b/include/linux/udf_fs.h
@@ -39,11 +39,11 @@
 
 #ifdef UDFFS_DEBUG
 #define udf_debug(f, a...) \
-       { \
+       do { \
                printk (KERN_DEBUG "UDF-fs DEBUG %s:%d:%s: ", \
                        __FILE__, __LINE__, __FUNCTION__); \
                printk (f, ##a); \
-       }
+       } while (0)
 #else
 #define udf_debug(f, a...) /**/
 #endif
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to