From 4d4121bf4095c3d6aed70452c4b317c36c83d625 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Wed, 11 Aug 2021 14:22:54 +0200 Subject: [PATCH] upnpdescgen.c: move a variable declaration --- miniupnpd/upnpdescgen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/miniupnpd/upnpdescgen.c b/miniupnpd/upnpdescgen.c index c4bd2f3..0a7294c 100644 --- a/miniupnpd/upnpdescgen.c +++ b/miniupnpd/upnpdescgen.c @@ -892,7 +892,6 @@ genXML(char * str, int * len, int * tmplen, { #define GENXML_STACK_SIZE 16 unsigned short i, j; - unsigned long k; int top; const char * eltname, *s; char c; @@ -968,6 +967,7 @@ genXML(char * str, int * len, int * tmplen, } else { + unsigned long k = (unsigned long)p[i].data; /* node with child(ren) */ /*printf("<%s>\n", eltname); */ str = strcat_char(str, len, tmplen, '<'); @@ -980,7 +980,6 @@ genXML(char * str, int * len, int * tmplen, str = strcat_str(str, len, tmplen, configid_str); } str = strcat_char(str, len, tmplen, '>'); - k = (unsigned long)p[i].data; i = k & 0xffff; j = i + (k >> 16); if(top < (GENXML_STACK_SIZE - 1)) {