"False" is not really a valid return value for "int"..
int count_current_connections( const char *sharename, bool clear )
{
struct count_stat cs;
+ int ret;
cs.curr_connections = 0;
cs.name = sharename;
* 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;