[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] isspace and friends take an int. solaris cares.



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	directory.c onion.c 
Log Message:
isspace and friends take an int. solaris cares.


Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/src/or/directory.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- directory.c	12 Mar 2004 12:43:13 -0000	1.64
+++ directory.c	19 Mar 2004 20:50:12 -0000	1.65
@@ -105,7 +105,7 @@
   int n1, n2;
   assert(headers && code);
 
-  while(isspace(*headers)) headers++; /* tolerate leading whitespace */
+  while(isspace((int)*headers)) headers++; /* tolerate leading whitespace */
 
   if(sscanf(headers, "HTTP/1.%d %d", &n1, &n2) < 2 ||
      (n1 != 0 && n1 != 1) ||

Index: onion.c
===================================================================
RCS file: /home/or/cvsroot/src/or/onion.c,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -d -r1.130 -r1.131
--- onion.c	18 Mar 2004 19:22:56 -0000	1.130
+++ onion.c	19 Mar 2004 20:50:12 -0000	1.131
@@ -164,11 +164,11 @@
   char nick[MAX_NICKNAME_LEN];
   routerinfo_t *router;
 
-  while(isspace(*list) || *list==',') list++;
+  while(isspace((int)*list) || *list==',') list++;
 
   start = list;
   while(*start) {
-    end=start; while(*end && !isspace(*end) && *end != ',') end++;
+    end=start; while(*end && !isspace((int)*end) && *end != ',') end++;
     memcpy(nick,start,end-start);
     nick[end-start] = 0; /* null terminate it */
     router = router_get_by_nickname(nick);
@@ -180,7 +180,7 @@
     } else
       log_fn(has_fetched_directory ? LOG_WARN : LOG_INFO,
              "Nickname list includes '%s' which isn't a known router.",nick);
-    while(isspace(*end) || *end==',') end++;
+    while(isspace((int)*end) || *end==',') end++;
     start = end;
   }
 }