$OpenBSD: patch-src_preprocessors_spp_http_decode_c,v 1.1 2003/09/03 21:32:33 pvalchev Exp $
--- src/preprocessors/spp_http_decode.c.orig	2003-04-03 14:10:53.000000000 -0700
+++ src/preprocessors/spp_http_decode.c	2003-09-03 15:29:06.000000000 -0600
@@ -482,11 +482,11 @@ PreprocUrlDecode(Packet * p)
     psize = (u_int16_t) (p->dsize);
 
     /* first skip past the HTTP method */
-    while(index < end && !lookup_whitespace[(u_int) (*index)])
+    while(index < end && !lookup_whitespace[(u_int8_t) (*index)])
         index++;
 
     /* skip over whitespace seperator */
-    while(index < end && lookup_whitespace[(u_int) (*index)])
+    while(index < end && lookup_whitespace[(u_int8_t) (*index)])
         index++;
 
     /* evilness check */
@@ -543,7 +543,7 @@ PreprocUrlDecode(Packet * p)
      * Would be included if we could munge packets in place but we need the
      * original packet data to stay around
      *
-     * do { if(*index == '%' || lookup_whitespace[(u_int)(*index)]) break;
+     * do { if(*index == '%' || lookup_whitespace[(u_int8_t)(*index)]) break;
      * if(*index == '?'  && end_on_url_param) break; if(*index == '\\' &&
      * iis_flip_slash) (*index) = '/'; } while(index++ < end);
      *
@@ -578,14 +578,14 @@ PreprocUrlDecode(Packet * p)
                 */
 
                 junk = 0;
-                hex1 = lookup_hexvalue[(u_int) (*(index + 2))];
-                hex2 = lookup_hexvalue[(u_int) (*(index + 3))];
+                hex1 = lookup_hexvalue[(u_int8_t) (*(index + 2))];
+                hex2 = lookup_hexvalue[(u_int8_t) (*(index + 3))];
                 if(hex1 != -1 && hex2 != -1)
                 {
                     junk = ((hex1 & 0x0f) << 12) + ((hex2 & 0x0f) << 8);
 
-                    hex1 = lookup_hexvalue[(u_int) (*(index + 4))];
-                    hex2 = lookup_hexvalue[(u_int) (*(index + 5))];
+                    hex1 = lookup_hexvalue[(u_int8_t) (*(index + 4))];
+                    hex2 = lookup_hexvalue[(u_int8_t) (*(index + 5))];
                     if(hex1 != -1 && hex2 != -1)
                     {
                         junk += (((hex1 & 0x0f) << 4) + (hex2 & 0x0f));
@@ -639,8 +639,8 @@ PreprocUrlDecode(Packet * p)
 
             if((index + 2) < end)
             {
-                hex1 = lookup_hexvalue[(u_int) (*(index + 1))];
-                hex2 = lookup_hexvalue[(u_int) (*(index + 2))];
+                hex1 = lookup_hexvalue[(u_int8_t) (*(index + 1))];
+                hex2 = lookup_hexvalue[(u_int8_t) (*(index + 2))];
             }
             else
             {
@@ -694,7 +694,7 @@ PreprocUrlDecode(Packet * p)
                 continue;
             }
         }
-        else if(lookup_whitespace[(u_int) (*index)])
+        else if(lookup_whitespace[(u_int8_t) (*index)])
         {
             /* we've reached the delimiting whitespace */
             /* UriBufs[0].http_version = (u_int8_t *) index; */
@@ -712,7 +712,7 @@ PreprocUrlDecode(Packet * p)
                 *cur = *index;            
                 while(index < end && ((cur - (char *) UriBufs[0].uri) < URI_LENGTH))
                 {
-                    if(lookup_whitespace[(u_int) (*index)])
+                    if(lookup_whitespace[(u_int8_t) (*index)])
                     {
                         /*
                          * we've reached the
