From 30191d1a5704ad2b158386b511558972d539ce47 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Oct 2007 17:40:25 -0700 Subject: RIP BOOL. Convert BOOL -> bool. I found a few interesting bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f) --- source3/libsmb/namequery.c | 52 +++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'source3/libsmb/namequery.c') diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index 5459210c64f..12e0d01b3b3 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -20,7 +20,7 @@ #include "includes.h" /* nmbd.c sets this to True. */ -BOOL global_in_nmbd = False; +bool global_in_nmbd = False; /**************************** * SERVER AFFINITY ROUTINES * @@ -46,11 +46,11 @@ static char *saf_key(const char *domain) /**************************************************************************** ****************************************************************************/ -BOOL saf_store( const char *domain, const char *servername ) +bool saf_store( const char *domain, const char *servername ) { char *key; time_t expire; - BOOL ret = False; + bool ret = False; if ( !domain || !servername ) { DEBUG(2,("saf_store: Refusing to store empty domain or servername!\n")); @@ -79,10 +79,10 @@ BOOL saf_store( const char *domain, const char *servername ) return ret; } -BOOL saf_delete( const char *domain ) +bool saf_delete( const char *domain ) { char *key; - BOOL ret = False; + bool ret = False; if ( !domain ) { DEBUG(2,("saf_delete: Refusing to delete empty domain\n")); @@ -111,7 +111,7 @@ char *saf_fetch( const char *domain ) { char *server = NULL; time_t timeout; - BOOL ret = False; + bool ret = False; char *key = NULL; if ( !domain || strlen(domain) == 0) { @@ -198,7 +198,7 @@ NODE_STATUS_STRUCT *node_status_query(int fd,struct nmb_name *name, struct in_addr to_ip, int *num_names, struct node_status_extra *extra) { - BOOL found=False; + bool found=False; int retries = 2; int retry_time = 2000; struct timeval tval; @@ -281,13 +281,13 @@ NODE_STATUS_STRUCT *node_status_query(int fd,struct nmb_name *name, a servers name given its IP. Return the matched name in *name. **************************************************************************/ -BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, fstring name) +bool name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, fstring name) { NODE_STATUS_STRUCT *status = NULL; struct nmb_name nname; int count, i; int sock; - BOOL result = False; + bool result = False; if (lp_disable_netbios()) { DEBUG(5,("name_status_find(%s#%02x): netbios is disabled\n", q_name, q_type)); @@ -471,11 +471,11 @@ static int remove_duplicate_addrs2( struct ip_service *iplist, int count ) ****************************************************************************/ struct in_addr *name_query(int fd,const char *name,int name_type, - BOOL bcast,BOOL recurse, + bool bcast,bool recurse, struct in_addr to_ip, int *count, int *flags, - BOOL *timed_out) + bool *timed_out) { - BOOL found=False; + bool found=False; int i, retries = 3; int retry_time = bcast?250:2000; struct timeval tval; @@ -669,7 +669,7 @@ XFILE *startlmhosts(const char *fname) Parse the next line in the lmhosts file. *********************************************************/ -BOOL getlmhostsent( XFILE *fp, pstring name, int *name_type, struct in_addr *ipaddr) +bool getlmhostsent( XFILE *fp, pstring name, int *name_type, struct in_addr *ipaddr) { pstring line; @@ -761,7 +761,7 @@ void endlmhosts(XFILE *fp) return False on failure. Port is set to PORT_NONE; *********************************************************/ -static BOOL convert_ip2service( struct ip_service **return_iplist, struct in_addr *ip_list, int count ) +static bool convert_ip2service( struct ip_service **return_iplist, struct in_addr *ip_list, int count ) { int i; @@ -895,7 +895,7 @@ NTSTATUS resolve_wins(const char *name, int name_type, for (i=0; i