05.patch

text/x-patch

Filename: 05.patch
Type: text/x-patch
Part: 4
Message: ECPG fixes, was: Re: ECPG FETCH readahead

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
File+
src/interfaces/ecpg/ecpglib/execute.c 2 7
commit bd94cc347e63ca0d69550d3a89eeed9990c1eb87
Author: Böszörményi Zoltán <zb@cybertec.at>
Date:   Wed Nov 20 10:35:08 2013 +0100

    ECPG: Simplify free_variable()

diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 1a7876e..e5ee8a9 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -87,16 +87,11 @@ free_variable(struct variable * var)
 {
 	struct variable *var_next;
 
-	if (var == NULL)
-		return;
-	var_next = var->next;
-	ecpg_free(var);
-
-	while (var_next)
+	while (var)
 	{
-		var = var_next;
 		var_next = var->next;
 		ecpg_free(var);
+		var = var_next;
 	}
 }