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