aboutsummaryrefslogtreecommitdiff
path: root/notes.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-07-22 10:25:17 -0700
committerJunio C Hamano <gitster@pobox.com>2014-07-22 10:25:17 -0700
commitcfececfe1ff1554783030a6f08b431ad50263800 (patch)
tree8b034605baeeb0f2d867caa6e7270f604bce9247 /notes.c
parent1fbc6e6e6062c14f21d0d826aaa3c154dba0f9e8 (diff)
parent92e25b6b5b66320e73ace921f3db816ef4243d1b (diff)
downloadgit-cfececfe1ff1554783030a6f08b431ad50263800.tar.gz
git-cfececfe1ff1554783030a6f08b431ad50263800.tar.xz
Merge branch 'bg/xcalloc-nmemb-then-size' into maint
* bg/xcalloc-nmemb-then-size: transport-helper.c: rearrange xcalloc arguments remote.c: rearrange xcalloc arguments reflog-walk.c: rearrange xcalloc arguments pack-revindex.c: rearrange xcalloc arguments notes.c: rearrange xcalloc arguments imap-send.c: rearrange xcalloc arguments http-push.c: rearrange xcalloc arguments diff.c: rearrange xcalloc arguments config.c: rearrange xcalloc arguments commit.c: rearrange xcalloc arguments builtin/remote.c: rearrange xcalloc arguments builtin/ls-remote.c: rearrange xcalloc arguments
Diffstat (limited to 'notes.c')
-rw-r--r--notes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/notes.c b/notes.c
index 5f07c0b7f..5fe691dbc 100644
--- a/notes.c
+++ b/notes.c
@@ -303,7 +303,7 @@ static int note_tree_insert(struct notes_tree *t, struct int_node *tree,
free(entry);
return 0;
}
- new_node = (struct int_node *) xcalloc(sizeof(struct int_node), 1);
+ new_node = (struct int_node *) xcalloc(1, sizeof(struct int_node));
ret = note_tree_insert(t, new_node, n + 1, l, GET_PTR_TYPE(*p),
combine_notes);
if (ret)
@@ -443,7 +443,7 @@ static void load_subtree(struct notes_tree *t, struct leaf_node *subtree,
if (len <= 20) {
type = PTR_TYPE_NOTE;
l = (struct leaf_node *)
- xcalloc(sizeof(struct leaf_node), 1);
+ xcalloc(1, sizeof(struct leaf_node));
hashcpy(l->key_sha1, object_sha1);
hashcpy(l->val_sha1, entry.sha1);
if (len < 20) {
@@ -1003,7 +1003,7 @@ void init_notes(struct notes_tree *t, const char *notes_ref,
if (!combine_notes)
combine_notes = combine_notes_concatenate;
- t->root = (struct int_node *) xcalloc(sizeof(struct int_node), 1);
+ t->root = (struct int_node *) xcalloc(1, sizeof(struct int_node));
t->first_non_note = NULL;
t->prev_non_note = NULL;
t->ref = notes_ref ? xstrdup(notes_ref) : NULL;