Cleaner error handling with ELFU_WARN and ELFU_WARNELF
[centaur.git] / src / elfops / section-in-segment.c
index 1ac9b845732627820e9a72795f428d465b249266..143c03f7a823336be60d556b198a784f2206d85a 100644 (file)
@@ -1,4 +1,3 @@
-#include <stdio.h>
 #include <stdlib.h>
 
 #include <libelf/libelf.h>
@@ -56,7 +55,7 @@ Elf_Scn* elfu_eScnLastInSegment(Elf *e, GElf_Phdr *phdr)
     GElf_Shdr shdr;
 
     if (gelf_getshdr(scn, &shdr) != &shdr) {
-      fprintf(stderr, "gelf_getshdr() failed: %s\n", elf_errmsg(-1));
+      ELFU_WARNELF("gelf_getshdr");
       continue;
     }