summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-01-07 18:11:37 +0000
committerAurelien Foret <aurelien@archlinux.org>2006-01-07 18:11:37 +0000
commitfce68beaafade3453b89ade29d95e99ac172de01 (patch)
treefcac5a4a6a97bece2a6cb76da038856b8c45828b /src
parent02694534be2c9822a5129cb536c057712aa85d95 (diff)
downloadpacman-fce68beaafade3453b89ade29d95e99ac172de01.tar.xz
code cleanup
Diffstat (limited to 'src')
-rw-r--r--src/pacman/util.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c
index a279e004..af77e8ea 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -195,8 +195,10 @@ int yesno(char *fmt, ...)
char response[32];
va_list args;
- if(!config->noconfirm)
- {
+ if(config->noconfirm) {
+ return(1);
+ }
+
va_start(args, fmt);
vprintf(fmt, args);
va_end(args);
@@ -222,9 +224,6 @@ int yesno(char *fmt, ...)
}
}
return(0);
- } else {
- return(1);
- }
}
/* match a string against a regular expression */