diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-03-20 01:25:39 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-03-20 01:25:39 +0300 |
commit | bfcc6e2a68b95ee71fc606a2e3917af78f1130f9 (patch) | |
tree | 30a225e537754d8b2579304d9872b0374be18c73 /add-interactive.c | |
parent | af107029b1b10f56b7e8b35ea605eab54f4efbe2 (diff) | |
parent | 241b5d3ebeea21b70a74fdc8c74e73f7ed829cb1 (diff) |
Merge branch 'rs/xcalloc-takes-nelem-first'
Code cleanup.
* rs/xcalloc-takes-nelem-first:
fix xcalloc() argument order
Diffstat (limited to 'add-interactive.c')
-rw-r--r-- | add-interactive.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/add-interactive.c b/add-interactive.c index 1f3f8f72f8..36ebdbdf7e 100644 --- a/add-interactive.c +++ b/add-interactive.c @@ -413,7 +413,7 @@ struct file_item { static void add_file_item(struct string_list *files, const char *name) { - struct file_item *item = xcalloc(sizeof(*item), 1); + struct file_item *item = xcalloc(1, sizeof(*item)); string_list_append(files, name)->util = item; } @@ -1120,7 +1120,7 @@ int run_add_i(struct repository *r, const struct pathspec *ps) int res = 0; for (i = 0; i < ARRAY_SIZE(command_list); i++) { - struct command_item *util = xcalloc(sizeof(*util), 1); + struct command_item *util = xcalloc(1, sizeof(*util)); util->command = command_list[i].command; string_list_append(&commands.items, command_list[i].string) ->util = util; |