]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
dont use variables that goes out of scope 215/head
authorMagnus Röös <mla@spotify.com>
Tue, 8 Jan 2013 19:38:22 +0000 (20:38 +0100)
committerMagnus Röös <mla@spotify.com>
Tue, 8 Jan 2013 19:38:22 +0000 (20:38 +0100)
Change-Id: Ica5f05e63bb811141314cc24f4f68be245f364f6

src/htsbuf.c

index 03f49a3a1ef6cb6a9e497d9dbcb747c82483a732..045fa07176db57781e717d4da034251c3cb65839 100644 (file)
@@ -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];;