summaryrefslogtreecommitdiff
path: root/lib/formats.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2000-02-15 16:00:00 +0000
committerjbj <devnull@localhost>2000-02-15 16:00:00 +0000
commit6b70a982bc5ea599d32650a6b8ed45dac23cf8f8 (patch)
tree05d43a4acbc3056ba6511367c674d7f805836877 /lib/formats.c
parentd932818c2369e9d39c2da0b8605a0f702a38ffde (diff)
downloadrpm-6b70a982bc5ea599d32650a6b8ed45dac23cf8f8.tar.gz
rpm-6b70a982bc5ea599d32650a6b8ed45dac23cf8f8.tar.bz2
rpm-6b70a982bc5ea599d32650a6b8ed45dac23cf8f8.zip
Fix inverted test on headerGetEntry return.
CVS patchset: 3557 CVS date: 2000/02/15 16:00:00
Diffstat (limited to 'lib/formats.c')
-rw-r--r--lib/formats.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/formats.c b/lib/formats.c
index 55c94b29e..50a804089 100644
--- a/lib/formats.c
+++ b/lib/formats.c
@@ -355,11 +355,12 @@ static int i18nTag(Header h, int_32 tag, /*@out@*/ int_32 * type,
#else
const char * domains = NULL;
#endif
+ int rc;
*type = RPM_STRING_TYPE;
*data = NULL;
*count = 0;
- *freeData = 1;
+ *freeData = 0;
if (domains) {
char * dstring, *domain, *de;
@@ -387,12 +388,15 @@ static int i18nTag(Header h, int_32 tag, /*@out@*/ int_32 * type,
if (domain && msgid) {
*data = xstrdup(/*@-unrecog@*/ dgettext(domain, msgid) /*@=unrecog@*/);
*count = 1;
+ *freeData = 1;
}
xfree(dstring);
return (*data ? 0 : 1);
}
- return headerGetEntry(h, tag, type, data, count);
+ rc = headerGetEntry(h, tag, type, data, count);
+
+ return (rc ? 0 : 1);
}
static int summaryTag(Header h, /*@out@*/ int_32 * type,