cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH] curl_fnmatch: Use int not bool when function returns int

From: Tor Arntsen <tor_at_spacetec.no>
Date: Fri, 21 May 2010 14:21:44 +0000

bool in curl internals is unsigned char and should not be used
to receive return value from functions returning int - this fails
when using IBM VisualAge and Tru64 compilers.

---
This fixes test577 for AIX 6.1 with Xlc 5.0, and Tru64 with native compiler.
(commiter: Please massage the commit message (above ---) if you feel it could
be improved.)
 lib/curl_fnmatch.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/curl_fnmatch.c b/lib/curl_fnmatch.c
index 91485a5..95e1077 100644
--- a/lib/curl_fnmatch.c
+++ b/lib/curl_fnmatch.c
@@ -344,7 +344,7 @@ static int loop(const unsigned char *pattern, const unsigned char *string)
       else if(*p == '[') {
         unsigned char *pp = p+1; /* cannot handle with pointer to register */
         if(setcharset(&pp, charset)) {
-          bool found = FALSE;
+	  int found = FALSE;
           if(charset[(unsigned int)*s])
             found = TRUE;
           else if(charset[CURLFNM_ALNUM])
-- 
1.7.1
--------------060809080008080308070309
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
--------------060809080008080308070309--
Received on 2001-09-17