Check return value of fwrite when copying files
commit41724cbcdef11cb00fcd720c75d399288ea41fd0
authorAllan McRae <allan@archlinux.org>
Sun, 27 Jun 2010 11:13:01 +0000 (27 21:13 +1000)
committerDan McGee <dan@archlinux.org>
Thu, 1 Jul 2010 04:49:48 +0000 (30 23:49 -0500)
treec55ca577292793d9774d661f5fb8339b69f14c49
parent96a1255eadd8b1faaffbfc2e9bdb1aa5e46ee04c
Check return value of fwrite when copying files

Check that writing to destination file actually occurs in
_alpm_copyfile.  Required adding a new error (PM_ERR_WRITE)
as none of the others appeared appropriate.

Prevents compiler warning when using -D_FORTIFY_SOURCE=2.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
lib/libalpm/alpm.h
lib/libalpm/util.c