From: Stefan Metzmacher Date: Wed, 10 Feb 2010 18:49:48 +0000 (+0100) Subject: s3:smbd: Fix really ugly bool vs. int bug!!! X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d4d547b901986cff378f640e9e22931d77c61b8;p=thirdparty%2Fsamba.git s3:smbd: Fix really ugly bool vs. int bug!!! 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) --- diff --git a/source/smbd/lanman.c b/source/smbd/lanman.c index 5fb05de9f19..bc1cb953f10 100644 --- a/source/smbd/lanman.c +++ b/source/smbd/lanman.c @@ -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)); }