فهرست منبع

Prevent sign conversion

We must convert the result of the unsigned subtraction to signed to
avoid compiler warnings.
Matt Clarkson 10 سال پیش
والد
کامیت
e0948d0d98
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -5467,7 +5467,7 @@ static char *addenv(struct cgi_env_block *block, const char *fmt, ...)
 		return NULL;
 
 	/* Calculate how much space is left in the buffer */
-	space = sizeof(block->buf) - block->len - 2;
+	space = (int)(sizeof(block->buf) - block->len) - 2;
 	/* assert(space >= 0); */
 	if (space < 0)
 		return NULL;