From 2817eed7412380116766a75718c90e635f6c93f4 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 14 Jun 2011 17:50:41 +0200 Subject: s3: Fix count_current_connections "False" is not really a valid return value for "int".. --- source3/smbd/connection.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c index 8560a5d211..08afd92f6e 100644 --- a/source3/smbd/connection.c +++ b/source3/smbd/connection.c @@ -101,6 +101,7 @@ static int count_fn(struct db_record *rec, int count_current_connections( const char *sharename, bool clear ) { struct count_stat cs; + int ret; cs.curr_connections = 0; cs.name = sharename; @@ -111,10 +112,11 @@ int count_current_connections( const char *sharename, bool clear ) * as it leads to deadlock. */ - if (connections_forall(count_fn, &cs) == -1) { + ret = connections_forall(count_fn, &cs); + if (ret == -1) { DEBUG(0,("count_current_connections: traverse of " "connections.tdb failed\n")); - return False; + return 0; } return cs.curr_connections; -- cgit