diff --git a/lib/util/regress/hexchar/hexchar_test.c b/lib/util/regress/hexchar/hexchar_test.c index 284d1d42b..097cbcd8f 100644 --- a/lib/util/regress/hexchar/hexchar_test.c +++ b/lib/util/regress/hexchar/hexchar_test.c @@ -46,7 +46,7 @@ main(int argc, char *argv[]) /* Build up test data. */ ntests = 256 + 256 + 3; - test_data = calloc(sizeof(*test_data), (size_t)ntests); + test_data = calloc((size_t)ntests, sizeof(*test_data)); for (i = 0; i < 256; i++) { /* lower case */ test_data[i].value = i; diff --git a/lib/util/regress/parse_gids/parse_gids_test.c b/lib/util/regress/parse_gids/parse_gids_test.c index 786843ff7..3a94a72e6 100644 --- a/lib/util/regress/parse_gids/parse_gids_test.c +++ b/lib/util/regress/parse_gids/parse_gids_test.c @@ -69,7 +69,8 @@ int main(int argc, char *argv[]) { GETGROUPS_T *gidlist = NULL; - int i, j, errors = 0, ntests = 0; + size_t i; + int j, errors = 0, ntests = 0; int ch, ngids; initprogname(argc > 0 ? argv[0] : "parse_gids_test"); diff --git a/lib/util/sudo_conf.c b/lib/util/sudo_conf.c index 3104da166..f884baa0b 100644 --- a/lib/util/sudo_conf.c +++ b/lib/util/sudo_conf.c @@ -360,7 +360,7 @@ parse_plugin(const char *entry, const char *conf_file, unsigned int lineno) options[nopts] = NULL; } - info = calloc(sizeof(*info), 1); + info = calloc(1, sizeof(*info)); if (info == NULL) goto oom; info->symbol_name = strndup(symbol, symlen);