Simplify check_installed_pkg to avoid calling xbps-pkgdb unnecessarily.
--HG-- extra : convert_revision : 6e0f6f96a65b346e2e2e3c3253e5469d5eed8ede
This commit is contained in:
@@ -193,11 +193,8 @@ main(int argc, char **argv)
|
||||
exit(1);
|
||||
}
|
||||
obj = prop_dictionary_get(dbdict, argv[2]);
|
||||
if (obj == NULL) {
|
||||
printf("=> ERROR: package `%s' not registered in database.\n",
|
||||
argv[2]);
|
||||
if (obj == NULL)
|
||||
exit(1);
|
||||
}
|
||||
printf("%s\n", prop_string_cstring_nocopy(obj));
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user