]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
eve-file: fix -Wshadow warnings
authorVictor Julien <victor@inliniac.net>
Mon, 28 Nov 2016 09:09:16 +0000 (10:09 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 28 Nov 2016 12:55:19 +0000 (13:55 +0100)
src/output-json-file.c

index 29b3d0e5d1e617c0940f54d00bea8c12e41e3780..b47340aa65977da043600108825c73637786d1e1 100644 (file)
@@ -128,29 +128,29 @@ static void FileWriteJsonRecord(JsonFileLogThread *aft, const Packet *p, const F
             if (ff->flags & FILE_MD5) {
                 size_t x;
                 int i;
-                char s[256];
+                char str[256];
                 for (i = 0, x = 0; x < sizeof(ff->md5); x++) {
-                    i += snprintf(&s[i], 255-i, "%02x", ff->md5[x]);
+                    i += snprintf(&str[i], 255-i, "%02x", ff->md5[x]);
                 }
-                json_object_set_new(fjs, "md5", json_string(s));
+                json_object_set_new(fjs, "md5", json_string(str));
             }
             if (ff->flags & FILE_SHA1) {
                 size_t x;
                 int i;
-                char s[256];
+                char str[256];
                 for (i = 0, x = 0; x < sizeof(ff->sha1); x++) {
-                    i += snprintf(&s[i], 255-i, "%02x", ff->sha1[x]);
+                    i += snprintf(&str[i], 255-i, "%02x", ff->sha1[x]);
                 }
-                json_object_set_new(fjs, "sha1", json_string(s));
+                json_object_set_new(fjs, "sha1", json_string(str));
             }
             if (ff->flags & FILE_SHA256) {
                 size_t x;
                 int i;
-                char s[256];
+                char str[256];
                 for (i = 0, x = 0; x < sizeof(ff->sha256); x++) {
-                    i += snprintf(&s[i], 255-i, "%02x", ff->sha256[x]);
+                    i += snprintf(&str[i], 255-i, "%02x", ff->sha256[x]);
                 }
-                json_object_set_new(fjs, "sha256", json_string(s));
+                json_object_set_new(fjs, "sha256", json_string(str));
             }
 #endif
             break;