All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netfilter: Should xt_osf_remove_callback() return negative on errors?
@ 2009-11-11 22:33 Roel Kluin
  2009-11-13  8:32 ` Patrick McHardy
  0 siblings, 1 reply; 4+ messages in thread
From: Roel Kluin @ 2009-11-11 22:33 UTC (permalink / raw)
  To: Andrew Morton, LKML, Patrick McHardy, David S. Miller,
	netfilter-devel, netdev

Return a negative error value

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 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?

diff --git a/net/netfilter/xt_osf.c b/net/netfilter/xt_osf.c
index 63e1905..4d1a41b 100644
--- a/net/netfilter/xt_osf.c
+++ b/net/netfilter/xt_osf.c
@@ -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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] netfilter: Should xt_osf_remove_callback() return negative on errors?
@ 2009-11-11 22:33 Roel Kluin
  0 siblings, 0 replies; 4+ messages in thread
From: Roel Kluin @ 2009-11-11 22:33 UTC (permalink / raw)
  To: Andrew Morton, LKML, Patrick McHardy, David S. Miller,
	netfilter-devel

Return a negative error value

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 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?

diff --git a/net/netfilter/xt_osf.c b/net/netfilter/xt_osf.c
index 63e1905..4d1a41b 100644
--- a/net/netfilter/xt_osf.c
+++ b/net/netfilter/xt_osf.c
@@ -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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] netfilter: Should xt_osf_remove_callback() return negative on errors?
@ 2009-11-11 22:33 Roel Kluin
  0 siblings, 0 replies; 4+ messages in thread
From: Roel Kluin @ 2009-11-11 22:33 UTC (permalink / raw)
  To: Andrew Morton, LKML, Patrick McHardy, David S. Miller,
	netfilter-devel

Return a negative error value

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 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?

diff --git a/net/netfilter/xt_osf.c b/net/netfilter/xt_osf.c
index 63e1905..4d1a41b 100644
--- a/net/netfilter/xt_osf.c
+++ b/net/netfilter/xt_osf.c
@@ -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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-13  8:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-11 22:33 [PATCH] netfilter: Should xt_osf_remove_callback() return negative on errors? Roel Kluin
2009-11-13  8:32 ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2009-11-11 22:33 Roel Kluin
2009-11-11 22:33 Roel Kluin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.