Mercurial > urweb
diff src/c/http.c @ 1134:b08b73591d2c
Switch to gcc -Wall
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 28 Jan 2010 13:32:26 -0500 |
parents | 0cee0c8d8c37 |
children | b7118ffd32ae |
line wrap: on
line diff
--- a/src/c/http.c Thu Jan 28 10:48:49 2010 -0500 +++ b/src/c/http.c Thu Jan 28 13:32:26 2010 -0500 @@ -25,7 +25,7 @@ int len = strlen(h); char *p; - while (p = strchr(s, ':')) { + while ((p = strchr(s, ':'))) { if (p - s == len && !strncasecmp(s, h, len)) { return p + 2; } else { @@ -169,10 +169,10 @@ } path = s; - if (s = strchr(path, ' ')) + if ((s = strchr(path, ' '))) *s = 0; - if (s = strchr(path, '?')) { + if ((s = strchr(path, '?'))) { *s = 0; query_string = s+1; } @@ -180,7 +180,7 @@ query_string = NULL; s = headers; - while (s2 = strchr(s, '\r')) { + while ((s2 = strchr(s, '\r'))) { s = s2; if (s[1] == 0) @@ -228,8 +228,8 @@ int sockfd; // listen on sock_fd struct sockaddr_in my_addr; struct sockaddr_in their_addr; // connector's address information - int sin_size, yes = 1; - int uw_port = 8080, nthreads = 1, i, *names, opt; + socklen_t sin_size; + int yes = 1, uw_port = 8080, nthreads = 1, i, *names, opt; signal(SIGINT, sigint); signal(SIGPIPE, SIG_IGN); @@ -306,7 +306,6 @@ { pthread_t thread; - int name; if (pthread_create(&thread, NULL, client_pruner, &ls)) { fprintf(stderr, "Error creating pruner thread\n");