Patchwork [1/3] netfilter: xt_LOG: don't use xchg() for simple assignment

login
register
mail settings
Submitter Pablo Neira
Date April 3, 2012, 10:13 a.m.
Message ID <1333448001-2507-2-git-send-email-pablo@netfilter.org>
Download mbox | patch
Permalink /patch/150371/
State Accepted
Delegated to: David Miller
Headers show

Comments

Pablo Neira - April 3, 2012, 10:13 a.m.
From: Jan Beulich <JBeulich@suse.com>

At least on ia64 the (bogus) use of xchg() here results in the compiler
warning about an unused expression result. As only an assignment is
intended here, convert it to such.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 include/net/netfilter/xt_log.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/include/net/netfilter/xt_log.h b/include/net/netfilter/xt_log.h
index 7e1544e..9d9756c 100644
--- a/include/net/netfilter/xt_log.h
+++ b/include/net/netfilter/xt_log.h
@@ -47,7 +47,7 @@  static void sb_close(struct sbuff *m)
 	if (likely(m != &emergency))
 		kfree(m);
 	else {
-		xchg(&emergency_ptr, m);
+		emergency_ptr = m;
 		local_bh_enable();
 	}
 }