summaryrefslogtreecommitdiffstats
path: root/libopkg/opkg.c
diff options
context:
space:
mode:
Diffstat (limited to 'libopkg/opkg.c')
-rw-r--r--libopkg/opkg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libopkg/opkg.c b/libopkg/opkg.c
index b36dc1b..6d97789 100644
--- a/libopkg/opkg.c
+++ b/libopkg/opkg.c
@@ -778,6 +778,7 @@ pkg_t *
opkg_find_package(const char *name, const char *ver, const char *arch,
const char *repo)
{
+ int pkg_found = 0;
pkg_t *pkg = NULL;
pkg_vec_t *all;
int i;
@@ -815,12 +816,13 @@ opkg_find_package(const char *name, const char *ver, const char *arch,
}
/* match found */
+ pkg_found = 1;
break;
}
pkg_vec_free(all);
- return pkg;
+ return pkg_found ? pkg : NULL;
}
/**