diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-11-02 14:34:33 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-11-02 18:50:41 +0000 |
commit | 96c672aef59ac785f3d351698311bb358820cc3c (patch) | |
tree | f862797a5a7f161a5ec727ca1d7df322a6d58c05 /toxcore/LAN_discovery.c | |
parent | e2d63e04979b59698b7e541f2aebb3c74495a2d3 (diff) |
Compile as C++ for windows builds.
Compiling as C++ changes nothing semantically, but ensures that we don't
break C++ compatibility while also retaining C compatibility.
C++ compatibility is useful for tooling and additional diagnostics and
analyses.
Diffstat (limited to 'toxcore/LAN_discovery.c')
-rw-r--r-- | toxcore/LAN_discovery.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/LAN_discovery.c b/toxcore/LAN_discovery.c index d2bfb4e1..48e0e7bb 100644 --- a/toxcore/LAN_discovery.c +++ b/toxcore/LAN_discovery.c | |||
@@ -50,7 +50,7 @@ static void fetch_broadcast_info(uint16_t port) | |||
50 | { | 50 | { |
51 | broadcast_count = 0; | 51 | broadcast_count = 0; |
52 | 52 | ||
53 | IP_ADAPTER_INFO *pAdapterInfo = malloc(sizeof(IP_ADAPTER_INFO)); | 53 | IP_ADAPTER_INFO *pAdapterInfo = (IP_ADAPTER_INFO *)malloc(sizeof(IP_ADAPTER_INFO)); |
54 | unsigned long ulOutBufLen = sizeof(IP_ADAPTER_INFO); | 54 | unsigned long ulOutBufLen = sizeof(IP_ADAPTER_INFO); |
55 | 55 | ||
56 | if (pAdapterInfo == NULL) { | 56 | if (pAdapterInfo == NULL) { |
@@ -59,7 +59,7 @@ static void fetch_broadcast_info(uint16_t port) | |||
59 | 59 | ||
60 | if (GetAdaptersInfo(pAdapterInfo, &ulOutBufLen) == ERROR_BUFFER_OVERFLOW) { | 60 | if (GetAdaptersInfo(pAdapterInfo, &ulOutBufLen) == ERROR_BUFFER_OVERFLOW) { |
61 | free(pAdapterInfo); | 61 | free(pAdapterInfo); |
62 | pAdapterInfo = malloc(ulOutBufLen); | 62 | pAdapterInfo = (IP_ADAPTER_INFO *)malloc(ulOutBufLen); |
63 | 63 | ||
64 | if (pAdapterInfo == NULL) { | 64 | if (pAdapterInfo == NULL) { |
65 | return; | 65 | return; |