s3:smbd: Fix really ugly bool vs. int bug!!!
authorStefan Metzmacher <metze@samba.org>
Wed, 10 Feb 2010 18:49:48 +0000 (19:49 +0100)
committerKarolin Seeger <kseeger@samba.org>
Wed, 24 Feb 2010 15:25:10 +0000 (16:25 +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)
(cherry picked from commit 5d4d547b901986cff378f640e9e22931d77c61b8)

source/smbd/lanman.c

index 5fb05de9f19d10e14aec889c7030b26f4392a215..bc1cb953f10f124490789ba0c5d0ecdac218731f 100644 (file)
@@ -1352,7 +1352,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)
 {
        return(strcmp(s1->name,s2->name));
 }