]> git.ipfire.org Git - thirdparty/git.git/commit - server-info.c
wrapper.c: add and use fopen_or_warn()
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Wed, 3 May 2017 10:16:50 +0000 (17:16 +0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 26 May 2017 03:33:56 +0000 (12:33 +0900)
commite9d983f116c7de43f40a49aae60ebfe107f153ec
tree2d1b2b10e651eb3dd941a10379719c9abd8ef993
parent11dc1fcb3fa53f5a46486daa7cb38ed387153f2e
wrapper.c: add and use fopen_or_warn()

When fopen() returns NULL, it could be because the given path does not
exist, but it could also be some other errors and the caller has to
check. Add a wrapper so we don't have to repeat the same error check
everywhere.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 files changed:
attr.c
bisect.c
builtin/blame.c
commit.c
config.c
git-compat-util.h
ident.c
remote.c
rerere.c
sequencer.c
server-info.c
t/t1308-config-set.sh
t/t5512-ls-remote.sh
wrapper.c
wt-status.c