files-backend: prefer "0" for write_in_full() error check
[gitweb.git] / refs / files-backend.c
index dac33628b37d4e19ea15e6706f1ab67c9b3a3e6c..e35c64c001d98582f72945b3af9ab3bc5261273b 100644 (file)
@@ -3007,7 +3007,7 @@ static int files_reflog_expire(struct ref_store *ref_store,
                } else if (update &&
                           (write_in_full(get_lock_file_fd(&lock->lk),
                                oid_to_hex(&cb.last_kept_oid), GIT_SHA1_HEXSZ) < 0 ||
-                           write_str_in_full(get_lock_file_fd(&lock->lk), "\n") < 1 ||
+                           write_str_in_full(get_lock_file_fd(&lock->lk), "\n") < 0 ||
                            close_ref_gently(lock) < 0)) {
                        status |= error("couldn't write %s",
                                        get_lock_file_path(&lock->lk));