WIN32 compilation error fixes.
authorPekka Riikonen <priikone@silcnet.org>
Thu, 17 May 2007 15:18:16 +0000 (15:18 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Thu, 17 May 2007 15:18:16 +0000 (15:18 +0000)
lib/silchttp/silchttpserver.c
lib/silcutil/silcatomic.h

index 772d9c9b2b5e742a4d88bf8e3c54eb7c76a7a517..cd94c407f4f3d7f53dfd06961c2daf46eb8a1400 100644 (file)
@@ -146,7 +146,7 @@ static SilcBool silc_http_server_parse(SilcHttpServer httpd,
     SILC_LOG_DEBUG(("URI: '%s'", conn->uri));
 
     /* Protocol version compatibility */
-    tmp = memchr(tmp, '\0', data_len - (tmp - data)) + 1;
+    tmp = ((unsigned char *)memchr(tmp, '\0', data_len - (tmp - data))) + 1;
     SILC_LOG_DEBUG(("Protocol: %s", tmp));
     if (strstr(tmp, "HTTP/1.0"))
       conn->keepalive = FALSE;
index 15b393190a36f50b24b0f4fa04ec0616de43311d..681c8e951c822bd4c59601b85932dec5d087d1d5 100644 (file)
@@ -1208,7 +1208,8 @@ SilcBool silc_atomic_cas_pointer(SilcAtomicPointer *atomic, void *old_val,
 
 #elif defined(SILC_WIN32)
   /* Windows */
-  return InterlockedCompareExchangePointer(&atomic->value, n, o) == o;
+  return InterlockedCompareExchangePointer(&atomic->value, new_val, old_val)
+    == old_val;
 
 #elif defined(__GNUC__) && defined(SILC_I486)
   /* GCC + i486 */