From 99f5549a2940687d87bc720a18529d21254ad843 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 20 Jan 2012 12:38:24 +0100 Subject: [PATCH] xbps_pkgdb_replace_pkgd: fix bool vs int confusion in returned value. --- include/xbps_api.h | 2 +- lib/pkgdb.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/xbps_api.h b/include/xbps_api.h index 158cd183..7411b100 100644 --- a/include/xbps_api.h +++ b/include/xbps_api.h @@ -56,7 +56,7 @@ */ #define XBPS_PKGINDEX_VERSION "1.4" -#define XBPS_API_VERSION "20120120" +#define XBPS_API_VERSION "20120120-1" #define XBPS_VERSION "0.12" /** diff --git a/lib/pkgdb.c b/lib/pkgdb.c index 716dad12..c18ea4b0 100644 --- a/lib/pkgdb.c +++ b/lib/pkgdb.c @@ -237,8 +237,8 @@ xbps_pkgdb_replace_pkgd(prop_dictionary_t pkgd, else rv = xbps_array_replace_dict_by_name(xhp->pkgdb, pkgd, pkg); - if (!flush || rv != 0) - return rv; + if (!flush) + return rv != 0 ? false : true; if ((xbps_pkgdb_update(xhp, true)) != 0) return false;