Permalink
Browse files

fixed more warnings from the Microsoft C compiler. thanks Edwin Cleto…

…n for the report.
  • Loading branch information...
agentzh committed Feb 8, 2014
1 parent 00102c3 commit 03eeb540c19b0754c5898104a59bc1bf1d4322be
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/ngx_http_encrypted_session_cipher.c
@@ -261,7 +261,8 @@ ngx_http_encrypted_session_ntohll(uint64_t n)
#ifdef ntohll
return ntohll(n);
#else
- return ((uint64_t) ntohl(n) << 32) + ntohl(n >> 32);
+ return ((uint64_t) ntohl((unsigned long) n) << 32)
+ + ntohl((unsigned long) (n >> 32));
#endif
}
@@ -272,6 +273,7 @@ ngx_http_encrypted_session_htonll(uint64_t n)
#ifdef htonll
return htonll(n);
#else
- return ((uint64_t) htonl(n) << 32) + htonl(n >> 32);
+ return ((uint64_t) htonl((unsigned long) n) << 32)
+ + htonl((unsigned long) (n >> 32));
#endif
}

0 comments on commit 03eeb54

Please sign in to comment.