From: Magnus Röös Date: Tue, 8 Jan 2013 19:38:22 +0000 (+0100) Subject: dont use variables that goes out of scope X-Git-Tag: v3.5~168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b25dd99a86bb9117651226b3800d0840f32361b;p=thirdparty%2Ftvheadend.git dont use variables that goes out of scope Change-Id: Ica5f05e63bb811141314cc24f4f68be245f364f6 --- diff --git a/src/htsbuf.c b/src/htsbuf.c index 03f49a3a1..045fa0717 100644 --- a/src/htsbuf.c +++ b/src/htsbuf.c @@ -384,6 +384,7 @@ htsbuf_append_and_escape_url(htsbuf_queue_t *hq, const char *s) while(1) { const char *esc; + char buf[4]; C = *c++; if((C >= '0' && C <= '9') || @@ -396,7 +397,6 @@ htsbuf_append_and_escape_url(htsbuf_queue_t *hq, const char *s) esc = NULL; } else { static const char hexchars[16] = "0123456789ABCDEF"; - char buf[4]; buf[0] = '%'; buf[1] = hexchars[(C >> 4) & 0xf]; buf[2] = hexchars[C & 0xf];;