diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-12-06 09:09:01 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-06 09:09:01 -0800 |
commit | 74d6c9de9b89e56e641aff840b15e4a8fb291638 (patch) | |
tree | 7a1f87556470c4152511661fe97bb0d4c096ffc7 | |
parent | Merge branch 'sw/pull-ipv46-passthru' into maint (diff) | |
parent | config: avoid "write_in_full(fd, buf, len) != len" pattern (diff) | |
download | tgif-74d6c9de9b89e56e641aff840b15e4a8fb291638.tar.xz |
Merge branch 'sd/branch-copy' into maint
Code clean-up.
* sd/branch-copy:
config: avoid "write_in_full(fd, buf, len) != len" pattern
-rw-r--r-- | config.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2811,7 +2811,7 @@ static int git_config_copy_or_rename_section_in_file(const char *config_filename * multiple [branch "$name"] sections. */ if (copystr.len > 0) { - if (write_in_full(out_fd, copystr.buf, copystr.len) != copystr.len) { + if (write_in_full(out_fd, copystr.buf, copystr.len) < 0) { ret = write_error(get_lock_file_path(lock)); goto out; } @@ -2873,7 +2873,7 @@ static int git_config_copy_or_rename_section_in_file(const char *config_filename * logic in the loop above. */ if (copystr.len > 0) { - if (write_in_full(out_fd, copystr.buf, copystr.len) != copystr.len) { + if (write_in_full(out_fd, copystr.buf, copystr.len) < 0) { ret = write_error(get_lock_file_path(lock)); goto out; } |