[PATCH osinfo-db-tools 1/7] import: Fix argc check in main()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



osinfo-db-import takes at least one argument, the path to one archive
file to import, and should just finish in case it's not passed.

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 tools/osinfo-db-import.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/osinfo-db-import.c b/tools/osinfo-db-import.c
index f90bef9..320abc9 100644
--- a/tools/osinfo-db-import.c
+++ b/tools/osinfo-db-import.c
@@ -241,7 +241,7 @@ gint main(gint argc, gchar **argv)
         goto error;
     }
 
-    if (argc > 2) {
+    if (argc < 2) {
         g_printerr(_("%s: expected path to one archive file to import\n"),
                    argv0);
         goto error;
-- 
2.17.1

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux