From: Matteo Croce Date: Fri, 3 Aug 2018 17:49:33 +0000 (+0200) Subject: ip link: don't stop batch processing X-Git-Tag: v4.18.0~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d56c7dde9dfb34794e983e7caf47a7ad3cf89579;p=thirdparty%2Fiproute2.git ip link: don't stop batch processing When 'ip link show dev DEVICE' is processed in a batch mode, ip exits and stop processing further commands. This because ipaddr_list_flush_or_save() calls exit() to avoid printing the link information twice. Replace the exit with a classic goto out instruction. Signed-off-by: Matteo Croce Signed-off-by: Stephen Hemminger --- diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 6c306ab75..b7b78f6e0 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -1920,7 +1920,7 @@ static int ipaddr_list_flush_or_save(int argc, char **argv, int action) exit(1); } delete_json_obj(); - exit(0); + goto out; } if (filter.family != AF_PACKET) {