From cdcf7dc577a23f27dbf12667c08f7254755887ad Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 7 May 2014 11:54:16 +0200 Subject: [PATCH] lldpcli: return success when reading commands from files When reading commands from files, we chose to not stop on errors (the main reason is to allow to specify nonexistent configuration files and allow lldpd to still work after incompatible updates). However, we also always return a failure status. Fix that. Thanks to Brian Bidulock for spotting that. Closes #62. --- src/client/lldpcli.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/lldpcli.c b/src/client/lldpcli.c index bdc2c926..5e0d027e 100644 --- a/src/client/lldpcli.c +++ b/src/client/lldpcli.c @@ -535,7 +535,10 @@ main(int argc, char *argv[]) goto end; } - if (gotinputs) goto end; + if (gotinputs) { + rc = EXIT_SUCCESS; + goto end; + } /* Interactive session */ #ifdef HAVE_LIBREADLINE -- 2.47.2