From: Jo-Philipp Wich Date: Mon, 6 Apr 2009 02:50:29 +0000 (+0000) Subject: contrib/lar: small fixes in cli.c X-Git-Tag: 0.9.0~533 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1744f962b0c0d324aa9a5ebbbcfb4f98e312a217;p=oweals%2Fluci.git contrib/lar: small fixes in cli.c --- diff --git a/contrib/lar/cli.c b/contrib/lar/cli.c index 026150e79..2b5e08891 100644 --- a/contrib/lar/cli.c +++ b/contrib/lar/cli.c @@ -33,17 +33,19 @@ int do_print_index( lar_archive *ar ) int main( int argc, const char* argv[] ) { lar_archive *ar; - + int stat = 0; + if( argv[1] != NULL ) { if( (ar = lar_open(argv[1])) != NULL ) { if( argv[2] ) - return do_print_member(ar, argv[2]); + stat = do_print_member(ar, argv[2]); else - return do_print_index(ar); + stat = do_print_index(ar); lar_close(ar); + return stat; } else { @@ -51,7 +53,7 @@ int main( int argc, const char* argv[] ) } } else - { + { printf("Usage: lar []\n"); return 1; }