This will fix the warnings Ramsay Jones pointed out. Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx> --- refs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index 9fc0e60..aae3b66 100644 --- a/refs.c +++ b/refs.c @@ -3058,12 +3058,12 @@ static int write_sha1_to_lock_file(struct ref_lock *lock, { if (lock->lk->fd == -1) { if (reopen_lock_file(lock->lk) < 0 - || fdopen_lock_file(lock->lk, "w") < 0 + || fdopen_lock_file(lock->lk, "w") == NULL || fprintf(lock->lk->fp, "%s\n", sha1_to_hex(sha1)) != 41 || close_lock_file(lock->lk) < 0) return -1; } else { - if (fdopen_lock_file(lock->lk, "w") < 0 + if (fdopen_lock_file(lock->lk, "w") == NULL || fprintf(lock->lk->fp, "%s\n", sha1_to_hex(sha1)) != 41) return -1; } -- 2.2.1.62.g3f15098 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html