bel2125 4 anni fa
parent
commit
112fe40496
2 ha cambiato i file con 3 aggiunte e 4 eliminazioni
  1. 3 2
      src/civetweb.c
  2. 0 2
      unittest/private.c

+ 3 - 2
src/civetweb.c

@@ -5401,7 +5401,8 @@ pthread_cond_timedwait(pthread_cond_t *cv,
 	struct mg_workerTLS **ptls,
 	struct mg_workerTLS **ptls,
 	    *tls = (struct mg_workerTLS *)pthread_getspecific(sTlsKey);
 	    *tls = (struct mg_workerTLS *)pthread_getspecific(sTlsKey);
 	int ok;
 	int ok;
-	int64_t nsnow, nswaitabs, nswaitrel;
+	uint64_t nsnow, nswaitabs;
+	int64_t nswaitrel;
 	DWORD mswaitrel;
 	DWORD mswaitrel;
 
 
 	pthread_mutex_lock(&cv->threadIdSec);
 	pthread_mutex_lock(&cv->threadIdSec);
@@ -5416,7 +5417,7 @@ pthread_cond_timedwait(pthread_cond_t *cv,
 	if (abstime) {
 	if (abstime) {
 		nsnow = mg_get_current_time_ns();
 		nsnow = mg_get_current_time_ns();
 		nswaitabs =
 		nswaitabs =
-		    (((int64_t)abstime->tv_sec) * 1000000000) + abstime->tv_nsec;
+		    (((uint64_t)abstime->tv_sec) * 1000000000) + abstime->tv_nsec;
 		nswaitrel = nswaitabs - nsnow;
 		nswaitrel = nswaitabs - nsnow;
 		if (nswaitrel < 0) {
 		if (nswaitrel < 0) {
 			nswaitrel = 0;
 			nswaitrel = 0;

+ 0 - 2
unittest/private.c

@@ -961,8 +961,6 @@ START_TEST(test_parse_http_headers)
 	ck_assert_ptr_eq(hdr[1].value, &buf[9]);
 	ck_assert_ptr_eq(hdr[1].value, &buf[9]);
 	ck_assert_ptr_eq(hdr[2].name, &buf[12]);
 	ck_assert_ptr_eq(hdr[2].name, &buf[12]);
 	ck_assert_ptr_eq(hdr[2].value, &buf[16]);
 	ck_assert_ptr_eq(hdr[2].value, &buf[16]);
-
-	int bp = 1;
 }
 }
 END_TEST
 END_TEST