Add wrapper around asprintf calls
commit28c662e7a422314475cca61663695dd31fd86546
authorAllan McRae <allan@archlinux.org>
Mon, 27 Sep 2010 05:30:39 +0000 (27 15:30 +1000)
committerAllan McRae <allan@archlinux.org>
Mon, 27 Sep 2010 06:06:51 +0000 (27 16:06 +1000)
tree2c4e52060540ad31de8f6caac75ce8dc32e1342a
parent879fed50985e511bba153c94d133f376e8f96484
Add wrapper around asprintf calls

Not checking the return value of asprintf calls reuslts in a warning
when using -D_FORTIRFY_SOURCE=2.  This adds a simple wrapper around
asprintf calls which checks the return value.

Currently the check does nothing more than outputing a message to stderr
on failure, but that is at least an improvement over silent failures.

Signed-off-by: Allan McRae <allan@archlinux.org>
src/pacman/util.c
src/pacman/util.h