[Libosinfo] [PATCH osinfo-db-tools 1/7] import: Fix argc check in main()
Fabiano Fidêncio
fidencio at redhat.com
Fri Sep 21 09:13:42 UTC 2018
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 at redhat.com>
---
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
More information about the Libosinfo
mailing list