[PATCH 3/6] refs.c: replace write_str_in_full by write_in_full
- From
Stefan Beller <sbeller@google.com>
- Date
- Jan 21, 2015, 23:23 UTC
- Message-ID
- <1421882625-916-4-git-send-email-sbeller@google.com>
- In-Reply-To
- <1421882625-916-1-git-send-email-sbeller@google.com>
There is another occurrence where we could have used write_str_in_full (line 3107: write_in_full(lock->lk->fd, &term, 1)), so the current state is inconsistent. This replaces the only occurrence of write_str_in_full by write_in_full, so we only need to wrap write_in_full in the next patch.
No functional changes intended.
Signed-off-by: Stefan Beller <sbeller@google.com> --- refs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/refs.c b/refs.c index e905f51..8281bed 100644 --- a/refs.c +++ b/refs.c @@ -4080,7 +4080,7 @@ int reflog_expire(const char *refname, const unsigned char *sha1, } else if ((flags & EXPIRE_REFLOGS_UPDATE_REF) && (write_in_full(lock->lk->fd, sha1_to_hex(cb.last_kept_sha1), 40) != 40 || - write_str_in_full(lock->lk->fd, "\n") != 1 || + write_in_full(lock->lk->fd, "\n", 1) != 1 || close_ref(lock) < 0)) { status |= error("couldn't write %s", lock->lk->filename.buf);
-- 2.2.1.62.g3f15098