Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2d954d06acbcf9a5f7668a1897850c9b7be6b8f3
Commit:     2d954d06acbcf9a5f7668a1897850c9b7be6b8f3
Parent:     986c76036adb0b12cbe1bf1ce1f75586585ee227
Author:     Al Viro <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 27 14:23:44 2007 +0100
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Jul 28 19:42:22 2007 -0700

    fix preprocessor idiocy in reiserfs
    
        #x blocks expansion of macro argument, but it won't do you any
    good if it's already been expanded...  As it is, RFALSE(cond, ....)
    ended up with stringified _expanded_ cond.  Real fun when cond contains
    something like le32_to_cpu() and you are on a big-endian box...
    
    Signed-off-by: Al Viro <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/linux/reiserfs_fs.h |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index 965d5b3..180a9d8 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -81,14 +81,16 @@ void reiserfs_warning(struct super_block *s, const char 
*fmt, ...);
 /* assertions handling */
 
 /** always check a condition and panic if it's false. */
-#define RASSERT( cond, format, args... )                                       
\
+#define __RASSERT( cond, scond, format, args... )                              
        \
 if( !( cond ) )                                                                
\
-  reiserfs_panic( NULL, "reiserfs[%i]: assertion " #cond " failed at " \
+  reiserfs_panic( NULL, "reiserfs[%i]: assertion " scond " failed at " \
                  __FILE__ ":%i:%s: " format "\n",              \
                  in_interrupt() ? -1 : current -> pid, __LINE__ , __FUNCTION__ 
, ##args )
 
+#define RASSERT(cond, format, args...) __RASSERT(cond, #cond, format, ##args)
+
 #if defined( CONFIG_REISERFS_CHECK )
-#define RFALSE( cond, format, args... ) RASSERT( !( cond ), format, ##args )
+#define RFALSE(cond, format, args...) __RASSERT(!(cond), "!(" #cond ")", 
format, ##args)
 #else
 #define RFALSE( cond, format, args... ) do {;} while( 0 )
 #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