s3:smbd: Fix really ugly bool vs. int bug!!!
authorStefan Metzmacher <metze@samba.org>
Tue, 9 Feb 2010 17:54:41 +0000 (18:54 +0100)
committerKarolin Seeger <kseeger@samba.org>
Wed, 10 Feb 2010 09:08:03 +0000 (10:08 +0100)
A comparison function for qsort needs to return an 'int'!
Otherwise you'll get random results depending on the compiler
and the architecture...

metze
(cherry picked from commit 1686a5e7e7eb1b411b003cbbde5c0d28741c6d02)

Part of a fix for bug #7119 (support for large browselist).

source3/smbd/lanman.c

index 83f0da422a35cbcd300a3f14904444904776ce36..c34b8672a53b1eac4ea2a2ac8eb2a27833c19fd0 100644 (file)
@@ -1351,7 +1351,7 @@ static int fill_srv_info(struct srv_info_struct *service,
 }
 
 
-static bool srv_comp(struct srv_info_struct *s1,struct srv_info_struct *s2)
+static int srv_comp(struct srv_info_struct *s1,struct srv_info_struct *s2)
 {
 #undef strcasecmp
        return strcasecmp(s1->name,s2->name);
@@ -1515,7 +1515,7 @@ static bool api_RNetServerEnum2(connection_struct *conn, uint16 vuid,
        return True;
 }
 
-static bool srv_name_match(const char *n1, const char *n2)
+static int srv_name_match(const char *n1, const char *n2)
 {
        /*
         * [MS-RAP] footnote <88> for Section 3.2.5.15 says: