From f1cb7f43dcd7a5a66615fae9551130dcf8ec3f16 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 26 May 2014 17:52:41 +0200 Subject: [PATCH] xbps-query: fix arg[cv] logic added in previous. --- bin/xbps-query/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/xbps-query/main.c b/bin/xbps-query/main.c index a83250c8..a73f01e9 100644 --- a/bin/xbps-query/main.c +++ b/bin/xbps-query/main.c @@ -153,7 +153,7 @@ main(int argc, char **argv) break; case 'p': props = optarg; - show_prop = opmode = true; + show_prop = true; break; case 'R': if (optarg != NULL) { @@ -201,9 +201,9 @@ main(int argc, char **argv) argc -= optind; argv += optind; - if (argc > 1) + if (argc == optind || (!argc && !opmode)) { usage(true); - else if (!opmode) { + } else if (!opmode) { /* show mode by default */ show = opmode = true; pkg = *argv;