From 5198dabcce9da535c4531b53990cfa11bd9f7896 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 3 Oct 2012 14:18:55 -0400 Subject: man: document behaviour of ListenStream= with only a port number in regards to IPv4/IPv6 --- src/core/load-fragment.c | 6 ++++-- src/shared/socket-util.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 93f051af47..2504d730dc 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -326,10 +326,12 @@ int config_parse_socket_bind( s = SOCKET(data); - if ((b = socket_address_bind_ipv6_only_from_string(rvalue)) < 0) { + b = socket_address_bind_ipv6_only_from_string(rvalue); + if (b < 0) { int r; - if ((r = parse_boolean(rvalue)) < 0) { + r = parse_boolean(rvalue); + if (r < 0) { log_error("[%s:%u] Failed to parse bind IPv6 only value, ignoring: %s", filename, line, rvalue); return 0; } diff --git a/src/shared/socket-util.c b/src/shared/socket-util.c index 7e65f8a691..4908403d9f 100644 --- a/src/shared/socket-util.c +++ b/src/shared/socket-util.c @@ -167,7 +167,8 @@ int socket_address_parse(SocketAddress *a, const char *s) { } else { /* Just a port */ - if ((r = safe_atou(s, &u)) < 0) + r = safe_atou(s, &u); + if (r < 0) return r; if (u <= 0 || u > 0xFFFF) -- cgit v1.2.3-54-g00ecf