everywhere: make use of new0() and macro() macros, and stop using perror()

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>