From 6b25dd99a86bb9117651226b3800d0840f32361b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20R=C3=B6=C3=B6s?= Date: Tue, 8 Jan 2013 20:38:22 +0100 Subject: [PATCH] dont use variables that goes out of scope Change-Id: Ica5f05e63bb811141314cc24f4f68be245f364f6 --- src/htsbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/htsbuf.c b/src/htsbuf.c index 03f49a3a..045fa071 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];;