]> granicus.if.org Git - apache/commitdiff
get mod_deflate to compile with compilers that care about the
authorJeff Trawick <trawick@apache.org>
Wed, 29 May 2002 14:26:00 +0000 (14:26 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 29 May 2002 14:26:00 +0000 (14:26 +0000)
signed-ness of char *

it looks like it should work fine, but it is untested

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95350 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_deflate.c

index 5b7b4ae6fd9ce5806b0ee0dba81e16f1fe2a9fc3..3813a2782c13926536c9a95cfc447d6465c6777c 100644 (file)
@@ -149,17 +149,17 @@ static void putLong(char *string, unsigned long x)
 
 /* Inputs a string and returns a long.
  */
-static unsigned long getLong(char *string)
+static unsigned long getLong(unsigned char *string)
 {
     int n = 3;
     unsigned long x = 0;
 
     while (n) {
-        x |= (unsigned long)((unsigned char)string[n--]) & 0xff;
+        x |= (unsigned long)(string[n--]) & 0xff;
         x <<= 8;
     }
 
-    x |= (unsigned long)((unsigned char)string[0]) & 0xff;
+    x |= (unsigned long)(string[0]) & 0xff;
     return x;
 }