summaryrefslogtreecommitdiff
path: root/src/database.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-12-08 08:30:58 +0200
committerTimo Teräs <timo.teras@iki.fi>2014-12-08 08:31:41 +0200
commit02cd5a9c76cd676545c232bb567d7eb01e5bd6fd (patch)
treece05b50bff40784b36c310eee0916be229e640b2 /src/database.c
parent6697ed5e86e64516ac56894d2f81c575ff72fd4f (diff)
downloadapk-tools-02cd5a9c76cd676545c232bb567d7eb01e5bd6fd.tar.gz
apk-tools-02cd5a9c76cd676545c232bb567d7eb01e5bd6fd.tar.bz2
apk-tools-02cd5a9c76cd676545c232bb567d7eb01e5bd6fd.tar.xz
apk-tools-02cd5a9c76cd676545c232bb567d7eb01e5bd6fd.zip
make del, fetch, fix and info return errors
In case all applet arguments are packages names (that is are not including wildcards), return error if they do not match to some package.
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/database.c b/src/database.c
index e35c127..f94826b 100644
--- a/src/database.c
+++ b/src/database.c
@@ -2774,9 +2774,7 @@ void apk_name_foreach_matching(struct apk_database *db, struct apk_string_array
foreach_array_item(pmatch, filter) {
name = (struct apk_name *) apk_hash_get(&db->available.names, APK_BLOB_STR(*pmatch));
- if (name == NULL)
- continue;
- if (genid) {
+ if (genid && name) {
if (name->foreach_genid >= genid)
continue;
name->foreach_genid = genid;