Mercurial > prosody-hg
comparison util-src/net.c @ 10637:aa304109fa1b
util.net: Fix signedness warning on ARM
net.c:87:56: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘long int’ [-Wsign-compare]
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
|---|---|
| date | Thu, 30 Jan 2020 14:22:21 +0100 |
| parents | 94cacf9fd0ae |
| children | 6eb5d2bb11af |
comparison
equal
deleted
inserted
replaced
| 10636:a9c975a0f113 | 10637:aa304109fa1b |
|---|---|
| 44 }; | 44 }; |
| 45 | 45 |
| 46 static int lc_local_addresses(lua_State *L) { | 46 static int lc_local_addresses(lua_State *L) { |
| 47 #ifndef _WIN32 | 47 #ifndef _WIN32 |
| 48 /* Link-local IPv4 addresses; see RFC 3927 and RFC 5735 */ | 48 /* Link-local IPv4 addresses; see RFC 3927 and RFC 5735 */ |
| 49 const long ip4_linklocal = htonl(0xa9fe0000); /* 169.254.0.0 */ | 49 const uint32_t ip4_linklocal = htonl(0xa9fe0000); /* 169.254.0.0 */ |
| 50 const long ip4_mask = htonl(0xffff0000); | 50 const uint32_t ip4_mask = htonl(0xffff0000); |
| 51 struct ifaddrs *addr = NULL, *a; | 51 struct ifaddrs *addr = NULL, *a; |
| 52 #endif | 52 #endif |
| 53 int n = 1; | 53 int n = 1; |
| 54 int type = luaL_checkoption(L, 1, "both", type_strings); | 54 int type = luaL_checkoption(L, 1, "both", type_strings); |
| 55 const char link_local = lua_toboolean(L, 2); /* defaults to 0 (false) */ | 55 const char link_local = lua_toboolean(L, 2); /* defaults to 0 (false) */ |
