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 <mcroce@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
Matteo Croce 2018-08-03 19:49:33 +02:00 committed by Stephen Hemminger
parent d66fdfda71
commit d56c7dde9d
1 changed files with 1 additions and 1 deletions

View File

@ -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) {