summaryrefslogtreecommitdiff
path: root/quotacheck.c
diff options
context:
space:
mode:
Diffstat (limited to 'quotacheck.c')
-rw-r--r--quotacheck.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/quotacheck.c b/quotacheck.c
index 1675de8..689ceb9 100644
--- a/quotacheck.c
+++ b/quotacheck.c
@@ -600,8 +600,7 @@ int ask_yn(char *q, int def)
printf("%s [%c]: ", q, def ? 'y' : 'n');
fflush(stdout);
- while (1) {
- fgets(a, sizeof(a)-1, stdin);
+ while (fgets(a, sizeof(a)-1, stdin)) {
if (a[0] == '\n')
return def;
if (!strcasecmp(a, "y\n"))
@@ -611,6 +610,7 @@ int ask_yn(char *q, int def)
printf("Illegal answer. Please answer y/n: ");
fflush(stdout);
}
+ return def;
}
/* Do checks and buffer quota file into memory */