Browse Source

Cast -1 to (char) to cope with different default char types on ARM.

Con Kolivas 12 years ago
parent
commit
566a80f05b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      util.c

+ 2 - 2
util.c

@@ -1768,7 +1768,7 @@ static bool http_negotiate(struct pool *pool, int sockd, bool http0)
 	/* Ignore unwanted headers till we get desired response */
 	for (i = 0; i < 4; i++) {
 		buf[i] = recv_byte(sockd);
-		if (buf[i] == -1) {
+		if (buf[i] == (char)-1) {
 			applog(LOG_WARNING, "Couldn't read HTTP byte from proxy %s:%s",
 			pool->sockaddr_proxy_url, pool->sockaddr_proxy_port);
 			return false;
@@ -1778,7 +1778,7 @@ static bool http_negotiate(struct pool *pool, int sockd, bool http0)
 		for (i = 0; i < 3; i++)
 			buf[i] = buf[i + 1];
 		buf[3] = recv_byte(sockd);
-		if (buf[3] == -1) {
+		if (buf[3] == (char)-1) {
 			applog(LOG_WARNING, "Couldn't read HTTP byte from proxy %s:%s",
 			pool->sockaddr_proxy_url, pool->sockaddr_proxy_port);
 			return false;