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
/* 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;
}