From: Harlan Stenn Date: Thu, 25 Jun 2015 04:26:18 +0000 (+0000) Subject: [Sec 2853] Initial work on tests/sec-2853/. Harlan Stenn. X-Git-Tag: NTP_4_2_8P3~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bff3b6dcd4a9e9eeaa4cc1ff3c87ad192fc6ea1;p=thirdparty%2Fntp.git [Sec 2853] Initial work on tests/sec-2853/. Harlan Stenn. bk: 558b82eaNzASEksK_izfD_UF_y5eSg --- diff --git a/tests/sec-2853/sec-2853.c b/tests/sec-2853/sec-2853.c index d0d1c6227..6499fdf1f 100644 --- a/tests/sec-2853/sec-2853.c +++ b/tests/sec-2853/sec-2853.c @@ -47,14 +47,13 @@ void test_main( void ) int basic_good( void ) { - const char *string = "good"; + const char string[] = "good"; const char *EOstring; char *cp; size_t len; int failed; - EOstring = string; - for (cp = string; *cp++; ++EOstring) ; + EOstring = string + sizeof string; len = remoteconfig_cmdlength(string, EOstring); @@ -98,14 +97,13 @@ int embedded_nul( void ) int trailing_space( void ) { - const char *string = "trailing space "; + const char string[] = "trailing space "; const char *EOstring; char *cp; size_t len; int failed; - EOstring = string; - for (cp = string; *cp++; ++EOstring) ; + EOstring = string + sizeof string; len = remoteconfig_cmdlength(string, EOstring);