diff options
-rw-r--r-- | src/pacman/util.c | 16 | ||||
-rw-r--r-- | src/pacman/util.h | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c index 51d6ecd7..22fdb361 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -1478,7 +1478,7 @@ int select_question(int count) /* presents a prompt and gets a Y/N answer */ __attribute__((format(printf, 2, 0))) -static int question(short preset, char *fmt, va_list args) +static int question(short preset, const char *format, va_list args) { char response[32]; FILE *stream; @@ -1496,7 +1496,7 @@ static int question(short preset, char *fmt, va_list args) fflush(stderr); fprintf(stream, ":: "); - vfprintf(stream, fmt, args); + vfprintf(stream, format, args); if(preset) { fprintf(stream, " %s ", _("[Y/n]")); @@ -1533,25 +1533,25 @@ static int question(short preset, char *fmt, va_list args) return 0; } -int yesno(char *fmt, ...) +int yesno(const char *format, ...) { int ret; va_list args; - va_start(args, fmt); - ret = question(1, fmt, args); + va_start(args, format); + ret = question(1, format, args); va_end(args); return ret; } -int noyes(char *fmt, ...) +int noyes(const char *format, ...) { int ret; va_list args; - va_start(args, fmt); - ret = question(0, fmt, args); + va_start(args, format); + ret = question(0, format, args); va_end(args); return ret; diff --git a/src/pacman/util.h b/src/pacman/util.h index f579b7ec..0a2a6f75 100644 --- a/src/pacman/util.h +++ b/src/pacman/util.h @@ -72,9 +72,9 @@ void print_packages(const alpm_list_t *packages); void select_display(const alpm_list_t *pkglist); int select_question(int count); int multiselect_question(char *array, int count); -int colon_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); -int yesno(char *fmt, ...) __attribute__((format(printf, 1, 2))); -int noyes(char *fmt, ...) __attribute__((format(printf, 1, 2))); +int colon_printf(const char *format, ...) __attribute__((format(printf, 1, 2))); +int yesno(const char *format, ...) __attribute__((format(printf, 1, 2))); +int noyes(const char *format, ...) __attribute__((format(printf, 1, 2))); int pm_printf(alpm_loglevel_t level, const char *format, ...) __attribute__((format(printf,2,3))); int pm_asprintf(char **string, const char *format, ...) __attribute__((format(printf,2,3))); |