diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-03-19 15:25:39 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-03-19 15:25:39 -0700 |
| commit | bfcc6e2a68b95ee71fc606a2e3917af78f1130f9 (patch) | |
| tree | 30a225e537754d8b2579304d9872b0374be18c73 /add-interactive.c | |
| parent | Merge branch 'ah/make-fuzz-all-doc-update' (diff) | |
| parent | fix xcalloc() argument order (diff) | |
| download | git-bfcc6e2a68b95ee71fc606a2e3917af78f1130f9.tar.gz git-bfcc6e2a68b95ee71fc606a2e3917af78f1130f9.zip | |
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; |
