xbps_check_is_installed_pkg_by_pattern: do not reset errno, leave it as is.

This commit is contained in:
Juan RP committed 2012-07-04 12:59:40 +02:00
1 parent 5c24ef3b7f
commit 172435bd7e
3 files changed
+7 -5

No files matched your search

+1 -3
View File
@@ -72,10 +72,8 @@ xbps_check_is_installed_pkg_by_pattern(struct xbps_handle *xhp,
if (dict == NULL) {
dict = xbps_find_pkg_dict_installed(xhp, pattern, true);
if (dict == NULL) {
if (errno == ENOENT) {
errno = 0;
if (errno == ENOENT)
return 0; /* not installed */
}
return -1; /* error */
}
}