diff options
author | Tom <tomaviv57@gmail.com> | 2020-04-17 17:53:40 +0300 |
---|---|---|
committer | Daniel Gustafsson <daniel@yesql.se> | 2020-04-19 21:56:52 +0200 |
commit | 207a6cbb909ba6df01ba5ed8f73acc733128bdf1 (patch) | |
tree | 6147eaa2eeae4181679eb9b419aa3821bd5e1db4 /tests/unit | |
parent | 0f5db7b263f14b03f24e6f1c3928e11e17dceee8 (diff) |
src: Remove C99 constructs to ensure C89 compliance
This fixes the error: 'for' loop initial declaration used outside C99
mode by declaring the loop increment variable in the beginning of the
block instead of inside the for loop.
Fixes #5254
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/unit1655.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unit/unit1655.c b/tests/unit/unit1655.c index a06b23a76..1b910ed9f 100644 --- a/tests/unit/unit1655.c +++ b/tests/unit/unit1655.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2019, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 2019 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -75,6 +75,7 @@ do { "this.is.an.otherwise-valid.hostname." "with-a-label-of-greater-length-than-the-sixty-three-characters-" "specified.in.the.RFCs."; + int i; struct test { const char *name; @@ -96,7 +97,7 @@ do { { max, DOH_OK } /* expect buffer overwrite */ }; - for(int i = 0; i < (int)(sizeof(playlist)/sizeof(*playlist)); i++) { + for(i = 0; i < (int)(sizeof(playlist)/sizeof(*playlist)); i++) { const char *name = playlist[i].name; size_t olen = 100000; struct demo victim; |