Skip to content

Commit

Permalink
Use snprintf() instead of _snprintf().
Browse files Browse the repository at this point in the history
This legacy nonsense seems not to be needed anymore as we haven't use it
consistently anyway.
  • Loading branch information
mity committed Dec 24, 2023
1 parent 6767681 commit ca476ba
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions include/acutest.h
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ acutest_run_(const struct acutest_test_* test, int index, int master_index)

/* Windows has no fork(). So we propagate all info into the child
* through a command line arguments. */
_snprintf(buffer, sizeof(buffer)-1,
snprintf(buffer, sizeof(buffer),
"%s --worker=%d %s --no-exec --no-summary %s --verbose=%d --color=%s -- \"%s\"",
acutest_argv0_, index, acutest_timer_ ? "--time" : "",
acutest_tap_ ? "--tap" : "", acutest_verbose_level_,
Expand Down Expand Up @@ -1321,11 +1321,7 @@ acutest_cmdline_read_(const ACUTEST_CMDLINE_OPTION_* options, int argc, char** a
if(opt->flags & (ACUTEST_CMDLINE_OPTFLAG_OPTIONALARG_ | ACUTEST_CMDLINE_OPTFLAG_REQUIREDARG_)) {
ret = callback(opt->id, argv[i]+2+len+1);
} else {
#if defined(ACUTEST_WIN_)
_snprintf(auxbuf, sizeof(auxbuf)-1, "--%s", opt->longname);
#else
snprintf(auxbuf, sizeof(auxbuf), "--%s", opt->longname);
#endif
ret = callback(ACUTEST_CMDLINE_OPTID_BOGUSARG_, auxbuf);
}
break;
Expand Down

0 comments on commit ca476ba

Please sign in to comment.