aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/bcast.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2008-07-14 22:44:01 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-14 22:44:01 -0700
commit0e35fd5e5264bb46d1febbe9cd9aa08421c21a96 (patch)
tree984ea14bf1e691d02b3202abeff087ba4369bc44 /net/tipc/bcast.c
parenttipc: Fix race condition that could cause accept() to fail (diff)
downloadlinux-dev-0e35fd5e5264bb46d1febbe9cd9aa08421c21a96.tar.xz
linux-dev-0e35fd5e5264bb46d1febbe9cd9aa08421c21a96.zip
tipc: Eliminate improper use of TIPC_OK error code
This patch corrects many places where TIPC routines indicated successful completion by returning TIPC_OK instead of 0. (The TIPC_OK symbol has the value 0, but it should only be used in contexts that deal with the error code field of a TIPC message header.) Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bcast.c')
-rw-r--r--net/tipc/bcast.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index a5883b1452ff..b1ff16aa4bdb 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -611,7 +611,7 @@ swap:
bcbearer->bpairs[bp_index].secondary = p;
update:
if (bcbearer->remains_new.count == 0)
- return TIPC_OK;
+ return 0;
bcbearer->remains = bcbearer->remains_new;
}
@@ -620,7 +620,7 @@ update:
bcbearer->bearer.publ.blocked = 1;
bcl->stats.bearer_congs++;
- return ~TIPC_OK;
+ return 1;
}
/**
@@ -756,7 +756,7 @@ int tipc_bclink_reset_stats(void)
spin_lock_bh(&bc_lock);
memset(&bcl->stats, 0, sizeof(bcl->stats));
spin_unlock_bh(&bc_lock);
- return TIPC_OK;
+ return 0;
}
int tipc_bclink_set_queue_limits(u32 limit)
@@ -769,7 +769,7 @@ int tipc_bclink_set_queue_limits(u32 limit)
spin_lock_bh(&bc_lock);
tipc_link_set_queue_limits(bcl, limit);
spin_unlock_bh(&bc_lock);
- return TIPC_OK;
+ return 0;
}
int tipc_bclink_init(void)
@@ -810,7 +810,7 @@ int tipc_bclink_init(void)
tipc_printbuf_init(&bcl->print_buf, pb, BCLINK_LOG_BUF_SIZE);
}
- return TIPC_OK;
+ return 0;
}
void tipc_bclink_stop(void)