summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/compat.c2
-rw-r--r--src/common/util.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index e4758aaf88..8574bd04c9 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1697,7 +1697,7 @@ log_credential_status(void)
/* log supplementary groups */
sup_gids_size = 64;
- sup_gids = tor_calloc(sizeof(gid_t), 64);
+ sup_gids = tor_calloc(64, sizeof(gid_t));
while ((ngids = getgroups(sup_gids_size, sup_gids)) < 0 &&
errno == EINVAL &&
sup_gids_size < NGROUPS_MAX) {
diff --git a/src/common/util.c b/src/common/util.c
index 3d81f2b530..77102837db 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -3465,8 +3465,8 @@ format_win_cmdline_argument(const char *arg)
smartlist_add(arg_chars, (void*)&backslash);
/* Allocate space for argument, quotes (if needed), and terminator */
- formatted_arg = tor_calloc(sizeof(char),
- (smartlist_len(arg_chars) + (need_quotes ? 2 : 0) + 1));
+ formatted_arg = tor_calloc((smartlist_len(arg_chars) + (need_quotes ? 2 : 0) + 1),
+ sizeof(char));
/* Add leading quote */
i=0;
@@ -5104,7 +5104,7 @@ tor_check_port_forwarding(const char *filename,
for each smartlist element (one for "-p" and one for the
ports), and one for the final NULL. */
args_n = 1 + 2*smartlist_len(ports_to_forward) + 1;
- argv = tor_calloc(sizeof(char *), args_n);
+ argv = tor_calloc(args_n, sizeof(char *));
argv[argv_index++] = filename;
SMARTLIST_FOREACH_BEGIN(ports_to_forward, const char *, port) {