From ca476bafbb09d94b7475649d70e8e63e7358ee97 Mon Sep 17 00:00:00 2001 From: Martin Mitas Date: Sun, 24 Dec 2023 22:51:29 +0100 Subject: [PATCH] Use snprintf() instead of _snprintf(). This legacy nonsense seems not to be needed anymore as we haven't use it consistently anyway. --- include/acutest.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/acutest.h b/include/acutest.h index 60dcdbd..f6476bc 100644 --- a/include/acutest.h +++ b/include/acutest.h @@ -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_, @@ -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;