summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-07-22 17:25:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-07-22 17:25:17 (GMT)
commitcfececfe1ff1554783030a6f08b431ad50263800 (patch)
tree8b034605baeeb0f2d867caa6e7270f604bce9247 /config.c
parent1fbc6e6e6062c14f21d0d826aaa3c154dba0f9e8 (diff)
parent92e25b6b5b66320e73ace921f3db816ef4243d1b (diff)
downloadgit-cfececfe1ff1554783030a6f08b431ad50263800.zip
git-cfececfe1ff1554783030a6f08b431ad50263800.tar.gz
git-cfececfe1ff1554783030a6f08b431ad50263800.tar.bz2
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 'config.c')
-rw-r--r--config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/config.c b/config.c
index 5272fc6..2634457 100644
--- a/config.c
+++ b/config.c
@@ -1538,7 +1538,7 @@ int git_config_set_multivar_in_file(const char *config_filename,
* The lock serves a purpose in addition to locking: the new
* contents of .git/config will be written into it.
*/
- lock = xcalloc(sizeof(struct lock_file), 1);
+ lock = xcalloc(1, sizeof(struct lock_file));
fd = hold_lock_file_for_update(lock, config_filename, 0);
if (fd < 0) {
error("could not lock config file %s: %s", config_filename, strerror(errno));
@@ -1793,7 +1793,7 @@ int git_config_rename_section_in_file(const char *config_filename,
if (!config_filename)
config_filename = filename_buf = git_pathdup("config");
- lock = xcalloc(sizeof(struct lock_file), 1);
+ lock = xcalloc(1, sizeof(struct lock_file));
out_fd = hold_lock_file_for_update(lock, config_filename, 0);
if (out_fd < 0) {
ret = error("could not lock config file %s", config_filename);