use new wrapper write_file() for simple file writing
commit91aacda85a91192a9f66a0f175d739f77971412f
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 30 Nov 2014 08:24:46 +0000 (30 15:24 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Dec 2014 19:00:16 +0000 (1 11:00 -0800)
treebeda5513b104a9f6a5295135250e4d70ee80d2ca
parent316e53e68c7c4d89876524f7f010685ebfe7be1e
use new wrapper write_file() for simple file writing

This fixes common problems in these code about error handling,
forgetting to close the file handle after fprintf() fails, or not
printing out the error string..

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/branch.c
builtin/init-db.c
daemon.c
submodule.c
transport.c