From 292422dbd02705099f5578c4da0ecf22712303d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20P=C3=ADsa=C5=99?= Date: Mon, 18 Jan 2010 22:35:54 +0100 Subject: [PATCH] Fix possibly undefined values old_ctx_node is really bug, prev_event is compiler non-intelligence --- src/isds.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/isds.c b/src/isds.c index 1b8b7be..6a7cbfd 100644 --- a/src/isds.c +++ b/src/isds.c @@ -2413,6 +2413,7 @@ static isds_error find_and_extract_DmHash(struct isds_ctx *context, isds_hash_free(hash); if (!xpath_ctx) return IE_INVAL; + old_ctx_node = xpath_ctx->node; *hash = calloc(1, sizeof(**hash)); if (!*hash) { @@ -2420,8 +2421,6 @@ static isds_error find_and_extract_DmHash(struct isds_ctx *context, goto leave; } - old_ctx_node = xpath_ctx->node; - /* Locate dmHash */ err = move_xpathctx_to_child(context, BAD_CAST "sisds:dmHash", xpath_ctx); if (err == IE_NOEXIST || err == IE_NOTUNIQ) { @@ -2669,7 +2668,7 @@ static isds_error extract_events(struct isds_ctx *context, isds_error err = IE_SUCCESS; xmlXPathObjectPtr result = NULL; xmlNodePtr events_node = xpath_ctx->node; - struct isds_list *event, *prev_event; + struct isds_list *event, *prev_event = NULL; if (!context) return IE_INVALID_CONTEXT; if (!events) return IE_INVAL; -- 2.11.4.GIT