xfs
[Top] [All Lists]

Small Patch, Probably Aesthetic Only

To: Linux-XFS <linux-xfs@xxxxxxxxxxx>
Subject: Small Patch, Probably Aesthetic Only
From: Danny Cox <danscox@xxxxxxxxxxxxxx>
Date: Thu, 30 Aug 2001 14:02:36 -0400
Organization: Snap
Reply-to: DCox@xxxxxxxxxxxxxx
Sender: owner-linux-xfs@xxxxxxxxxxx
All,

        My compiler was giving me the following warning:

xfs_fsops.c: In function `xfs_fs_log_dummy':
xfs_fsops.c:526: warning: suggest parentheses around assignment used as
truth value

in looking at the function, I determined that 'int error' is no longer
used, so this patch removes it, and thus, the compile warning also.

        Since this seems to be in the chain of a fs shutdown or unmount, it's
not used that often, so the only reason to apply it is to shut gcc up
;-).

        Patch attached.

-- 
"Men occasionally stumble over the truth, but most of them pick 
themselves up and hurry off as if nothing had happened." 
   -- Winston Churchill 

Danny
--- fs/xfs/xfs_fsops.c.orig     Thu Aug 30 13:45:45 2001
+++ fs/xfs/xfs_fsops.c  Thu Aug 30 13:46:25 2001
@@ -516,14 +516,11 @@
 {
        xfs_trans_t *tp;
        xfs_inode_t *ip;
-       int error;
 
 
        tp = _xfs_trans_alloc(mp, XFS_TRANS_DUMMY1);
        atomic_inc(&mp->m_active_trans);
-       if (error = xfs_trans_reserve(tp, 0,
-                       XFS_ICHANGE_LOG_RES(mp),
-                       0, 0, 0))  {
+       if (xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES(mp), 0, 0, 0))  {
                xfs_trans_cancel(tp, 0);
                return;
        }
@@ -534,7 +531,7 @@
        xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
        xfs_trans_ihold(tp, ip);
        xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
-       error = xfs_trans_commit(tp, XFS_TRANS_SYNC, NULL);
+       xfs_trans_commit(tp, XFS_TRANS_SYNC, NULL);
 
        xfs_iunlock(ip, XFS_ILOCK_EXCL);
 }
<Prev in Thread] Current Thread [Next in Thread>