Skip to contentSkip to conversation

netfilter: Should xt_osf_remove_callback() return negative on errors?

PATCH Applied Roel Kluin 2 participants 2 messages Nov 11, 2009 – Nov 13, 2009

Subsystems (3)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 netfilter: Should xt_osf_remove_callback() return negative on errors?

Return a negative error value

---
 net/netfilter/xt_osf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

It seems strange that an error return can be positive or negative, is this maybe required?

net/netfilter/xt_osf.c +1 -1
index 63e1905..4d1a41b 100644
@@ -118,7 +118,7 @@ static int xt_osf_remove_callback(struct sock *ctnl, struct sk_buff *skb,
 {
 	struct xt_osf_user_finger *f;
 	struct xt_osf_finger *sf;
-	int err = ENOENT;
+	int err = -ENOENT;
 
 	if (!osf_attrs[OSF_ATTR_FINGER])
 		return -EINVAL;
#1 lore raw
Quoted 1 line · Roel Kluin

Return a negative error value

Applied, thanks.