diff options
Diffstat (limited to 'toxcore/network.c')
-rw-r--r-- | toxcore/network.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/toxcore/network.c b/toxcore/network.c index ab0003e0..67122ea3 100644 --- a/toxcore/network.c +++ b/toxcore/network.c | |||
@@ -414,7 +414,7 @@ static void loglogdata(const Logger *log, const char *message, const uint8_t *bu | |||
414 | { | 414 | { |
415 | char ip_str[IP_NTOA_LEN]; | 415 | char ip_str[IP_NTOA_LEN]; |
416 | 416 | ||
417 | if (res < 0) { /* Windows doesn't necessarily know %zu */ | 417 | if (res < 0) { /* Windows doesn't necessarily know `%zu` */ |
418 | int error = net_error(); | 418 | int error = net_error(); |
419 | const char *strerror = net_new_strerror(error); | 419 | const char *strerror = net_new_strerror(error); |
420 | LOGGER_TRACE(log, "[%2u] %s %3u%c %s:%u (%u: %s) | %04x%04x", | 420 | LOGGER_TRACE(log, "[%2u] %s %3u%c %s:%u (%u: %s) | %04x%04x", |
@@ -842,14 +842,14 @@ Networking_Core *new_networking_ex(const Logger *log, IP ip, uint16_t port_from, | |||
842 | net_kill_strerror(strerror); | 842 | net_kill_strerror(strerror); |
843 | } | 843 | } |
844 | 844 | ||
845 | /* a hanging program or a different user might block the standard port; | 845 | /* A hanging program or a different user might block the standard port. |
846 | * as long as it isn't a parameter coming from the commandline, | 846 | * As long as it isn't a parameter coming from the commandline, |
847 | * try a few ports after it, to see if we can find a "free" one | 847 | * try a few ports after it, to see if we can find a "free" one. |
848 | * | 848 | * |
849 | * if we go on without binding, the first sendto() automatically binds to | 849 | * If we go on without binding, the first sendto() automatically binds to |
850 | * a free port chosen by the system (i.e. anything from 1024 to 65535) | 850 | * a free port chosen by the system (i.e. anything from 1024 to 65535). |
851 | * | 851 | * |
852 | * returning NULL after bind fails has both advantages and disadvantages: | 852 | * Returning NULL after bind fails has both advantages and disadvantages: |
853 | * advantage: | 853 | * advantage: |
854 | * we can rely on getting the port in the range 33445..33450, which | 854 | * we can rely on getting the port in the range 33445..33450, which |
855 | * enables us to tell joe user to open their firewall to a small range | 855 | * enables us to tell joe user to open their firewall to a small range |