diff options
Diffstat (limited to 'tests/server/sws.c')
-rw-r--r-- | tests/server/sws.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/server/sws.c b/tests/server/sws.c index 74dd3a778..702560a4f 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -238,10 +238,10 @@ static bool socket_domain_is_ip(void) /* parse the file on disk that might have a test number for us */ static int parse_cmdfile(struct httprequest *req) { - int testnum = DOCNUMBER_NOTHING; - char buf[256]; FILE *f = fopen(cmdfile, FOPEN_READTEXT); if(f) { + int testnum = DOCNUMBER_NOTHING; + char buf[256]; while(fgets(buf, sizeof(buf), f)) { if(1 == sscanf(buf, "Testnum %d", &testnum)) { logmsg("[%s] cmdfile says testnum %d", cmdfile, testnum); |