[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Solaris CC freaks out if isspace and friends get anything o...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] Solaris CC freaks out if isspace and friends get anything o...
- From: nickm@seul.org (Nick Mathewson)
- Date: Tue, 7 Dec 2004 19:43:08 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Tue, 07 Dec 2004 19:45:55 -0500
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv14849/src/or
Modified Files:
directory.c
Log Message:
Solaris CC freaks out if isspace and friends get anything other than an int. We learned that, so we casted. But it is also a bad idea to cast a signed char to an int and expect things to work on win32. Now we cast to unsigned char, then to int, then pass to isspace. Ug
Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -d -r1.179 -r1.180
--- directory.c 5 Dec 2004 07:10:08 -0000 1.179
+++ directory.c 8 Dec 2004 00:42:50 -0000 1.180
@@ -472,7 +472,7 @@
tor_assert(headers);
tor_assert(code);
- while (isspace((int)*headers)) headers++; /* tolerate leading whitespace */
+ while (TOR_ISSPACE(*headers)) headers++; /* tolerate leading whitespace */
if (sscanf(headers, "HTTP/1.%d %d", &n1, &n2) < 2 ||
(n1 != 0 && n1 != 1) ||