xfs
[Top] [All Lists]

[PATCH 3/4] xfs_logprint: kill XLOG_SET

To: Eric Sandeen <sandeen@xxxxxxxxxx>
Subject: [PATCH 3/4] xfs_logprint: kill XLOG_SET
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Wed, 02 Jan 2013 17:05:27 -0600
Cc: xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <50E4BBAC.9030604@xxxxxxxxxx>
References: <50E4BBAC.9030604@xxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/17.0 Thunderbird/17.0
Per Christoph's suggestion, kill off XLOG_SET macro
in favor of explicit "&" tests.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

diff --git a/logprint/log_misc.c b/logprint/log_misc.c
index b7af4ae..2e3dbdf 100644
--- a/logprint/log_misc.c
+++ b/logprint/log_misc.c
@@ -25,8 +25,6 @@
 #define BAD_HEADER     (-1)
 #define NO_ERROR       (0)
 
-#define XLOG_SET(f,b)  (((f) & (b)) == (b))
-
 static int logBBsize;
 char *trans_type[] = {
        "",
@@ -646,7 +644,7 @@ xlog_print_trans_inode(xfs_caddr_t *ptr,
     op_head = (xlog_op_header_t *)*ptr;
     xlog_print_op_header(op_head, *i, ptr);
 
-    if (XLOG_SET(op_head->oh_flags, XLOG_CONTINUE_TRANS))  {
+    if (op_head->oh_flags & XLOG_CONTINUE_TRANS)  {
        return f->ilf_size-1;
     }
 
@@ -701,7 +699,7 @@ xlog_print_trans_inode(xfs_caddr_t *ptr,
            }
 
            *ptr += be32_to_cpu(op_head->oh_len);
-           if (XLOG_SET(op_head->oh_flags, XLOG_CONTINUE_TRANS))
+           if (op_head->oh_flags & XLOG_CONTINUE_TRANS)
                return 1;
            op_head = (xlog_op_header_t *)*ptr;
     }
@@ -727,7 +725,7 @@ xlog_print_trans_inode(xfs_caddr_t *ptr,
                break;
            }
            *ptr += be32_to_cpu(op_head->oh_len);
-           if (XLOG_SET(op_head->oh_flags, XLOG_CONTINUE_TRANS))
+           if (op_head->oh_flags & XLOG_CONTINUE_TRANS)
                return 1;
            op_head = (xlog_op_header_t *)*ptr;
     }
@@ -935,8 +933,8 @@ xlog_print_record(int                         fd,
 
        print_xlog_op_line();
        xlog_print_op_header(op_head, i, &ptr);
-       continued = (XLOG_SET(op_head->oh_flags, XLOG_WAS_CONT_TRANS) ||
-                    XLOG_SET(op_head->oh_flags, XLOG_CONTINUE_TRANS));
+       continued = ((op_head->oh_flags & XLOG_WAS_CONT_TRANS) ||
+                    (op_head->oh_flags & XLOG_CONTINUE_TRANS));
 
        /* print transaction data */
        if (print_no_data ||


<Prev in Thread] Current Thread [Next in Thread>