X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=net.c;h=1369498905faa4ab729bac8209a6a03e8b920063;hp=42418e5f20d9e168eb0af5c7da9c2d1ffa1c2127;hb=0b6e7a20c19d642f9d8e65683e1525c91dd3de39;hpb=4ad8a5536d7cea1e63137933b242c52e57bd53d6 diff --git a/net.c b/net.c index 42418e5f..13694989 100644 --- a/net.c +++ b/net.c @@ -6,11 +6,7 @@ /** \file net.c Networking-related helper functions. */ -/* - * Since glibc 2.8, the _GNU_SOURCE feature test macro must be defined in order - * to obtain the definition of the ucred structure. - */ -#define _GNU_SOURCE +#include "para.h" #include #include @@ -32,7 +28,6 @@ #include -#include "para.h" #include "error.h" #include "net.h" #include "string.h" @@ -180,8 +175,7 @@ char *parse_url(const char *url, } if (*o == ':') - if (para_atoi32(++o, port) < 0 || - *port < 0 || *port > 0xffff) + if (para_atoi32(++o, port) < 0 || *port < 0 || *port > 0xffff) goto failed; if (host_string_ok(host)) return host; @@ -192,6 +186,7 @@ failed: /** * Stringify port number, resolve into service name where defined. + * * \param port 2-byte port number, in host-byte-order. * \param transport Transport protocol name (e.g. "udp", "tcp"), or NULL. * \return Pointer to static result buffer.