From: Vincent Bernat Date: Wed, 7 May 2014 09:54:16 +0000 (+0200) Subject: lldpcli: return success when reading commands from files X-Git-Tag: 0.7.9~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cdcf7dc577a23f27dbf12667c08f7254755887ad;p=thirdparty%2Flldpd.git 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. --- 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