diff options
Diffstat (limited to 'src/util/testpkg.c')
-rw-r--r-- | src/util/testpkg.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/util/testpkg.c b/src/util/testpkg.c index 1ad1d14b..7da18ca6 100644 --- a/src/util/testpkg.c +++ b/src/util/testpkg.c @@ -21,15 +21,13 @@ #include "config.h" -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <libgen.h> +#include <stdio.h> /* printf */ +#include <stdarg.h> /* va_list */ +#include <string.h> /* strlen */ #include <alpm.h> -void output_cb(pmloglevel_t level, char *fmt, va_list args) +static void output_cb(pmloglevel_t level, char *fmt, va_list args) { if(strlen(fmt)) { switch(level) { @@ -52,7 +50,7 @@ int main(int argc, char **argv) } if(alpm_initialize() == -1) { - fprintf(stderr, "cannot initilize alpm: %s\n", alpm_strerror(pm_errno)); + fprintf(stderr, "cannot initilize alpm: %s\n", alpm_strerrorlast()); return(1); } @@ -67,7 +65,7 @@ int main(int argc, char **argv) } if(alpm_release() == -1) { - fprintf(stderr, "error releasing alpm: %s\n", alpm_strerror(pm_errno)); + fprintf(stderr, "error releasing alpm: %s\n", alpm_strerrorlast()); } return(retval); |