From 8576ffe8bf005a0b0c9dd349d23b18b342a7ba3e Mon Sep 17 00:00:00 2001 From: Tomas Mlcoch Date: Wed, 4 Apr 2012 13:04:00 +0200 Subject: [PATCH] Fix some bugs --- src/misc.c | 2 +- src/xml_dump_primary.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/misc.c b/src/misc.c index d2cbb16..83bfecc 100644 --- a/src/misc.c +++ b/src/misc.c @@ -399,7 +399,7 @@ int copy_file(const char *src, const char *in_dst) } // If destination is dir use filename from src - gchar dst = in_dst; + gchar *dst = (gchar *) in_dst; if (g_str_has_suffix(in_dst, "/")) { dst = g_strconcat(in_dst, get_filename(src), NULL); } diff --git a/src/xml_dump_primary.c b/src/xml_dump_primary.c index ffe917f..a302852 100644 --- a/src/xml_dump_primary.c +++ b/src/xml_dump_primary.c @@ -98,9 +98,9 @@ void dump_pco(xmlNodePtr root, Package *package, int pcotype) } } - if (pcotype == REQUIRES) { + if (pcotype == REQUIRES && entry->pre) { // Add pre attribute - xmlNewProp(entry_node, BAD_CAST "pre", BAD_CAST ((entry->pre) ? "1" : "0")); + xmlNewProp(entry_node, BAD_CAST "pre", BAD_CAST "1"); } } } -- 2.7.4