diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-12-06 20:09:01 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-06 20:09:01 +0300 |
commit | 74d6c9de9b89e56e641aff840b15e4a8fb291638 (patch) | |
tree | 7a1f87556470c4152511661fe97bb0d4c096ffc7 | |
parent | 0114a7ad0664358f6f29b44461148f621520ed97 (diff) | |
parent | c5e3bc6ec46071397b40582157214d374d1b4fab (diff) |
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; } |