From abd84783d1f65dd76bdcfd89a5bb1c31528e4528 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sun, 28 Apr 2013 10:45:27 +0200 Subject: util/netutil: User proper C99 flexible array member Actually specifying an array length invokes undefined behaviour. (Not that I know of any compiler which uses array lengths within structs for anything other than determining the size of the struct, but let's just follow the spec.) --- src/util/netutil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/netutil.h b/src/util/netutil.h index 8ffd1c6..fc89dfd 100644 --- a/src/util/netutil.h +++ b/src/util/netutil.h @@ -61,7 +61,7 @@ struct net_getaddrinfo_t { uint16_t service; /* in */ int ret; /* out */ struct addrinfo *lst; /* out */ - char node[1]; /* in (sentinel) */ + char node[]; /* in (flexible array member) */ }; -- cgit v1.2.3