X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fxml.c;h=9fbe259f76e46ca686e6a1c571c63856637c964c;hb=056bca7aee6a336b5418bf2d8ae3dd5a7ca432a2;hp=fd5cddf198205a2fbb767a8351464593371e696c;hpb=3fa7b7a033ce803accfd6758029114323f6a6865;p=wimlib diff --git a/src/xml.c b/src/xml.c index fd5cddf1..9fbe259f 100644 --- a/src/xml.c +++ b/src/xml.c @@ -185,8 +185,8 @@ static u64 node_get_timestamp(const xmlNode *time_node) /* Used to sort an array of struct image_infos by their image indices. */ static int sort_by_index(const void *p1, const void *p2) { - int index_1 = ((struct image_info*)p1)->index; - int index_2 = ((struct image_info*)p1)->index; + int index_1 = ((const struct image_info*)p1)->index; + int index_2 = ((const struct image_info*)p2)->index; if (index_1 < index_2) return -1; else if (index_1 > index_2) @@ -1322,7 +1322,7 @@ int write_xml_data(const struct wim_info *wim_info, int image, FILE *out, encoding_handler = xmlGetCharEncodingHandler(XML_CHAR_ENCODING_UTF16LE); if (!encoding_handler) { ERROR("Failed to get XML character encoding handler for UTF-16LE"); - ret = WIMLIB_ERR_CHAR_CONVERSION; + ret = WIMLIB_ERR_LIBXML_UTF16_HANDLER_NOT_AVAILABLE; goto out_cleanup_char_encoding_handlers; }