diff options
Diffstat (limited to 'src/cli/report.cpp')
-rw-r--r-- | src/cli/report.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cli/report.cpp b/src/cli/report.cpp index 46205f7e..b6edef9a 100644 --- a/src/cli/report.cpp +++ b/src/cli/report.cpp @@ -542,10 +542,9 @@ static bool ask_yesno(const char *question) /* The response might take more than 1 char in non-latin scripts. */ const char *yes = _("y"); const char *no = _("N"); - char *full_question = xasprintf("%s [%s/%s]: ", question, yes, no); - printf(full_question); - free(full_question); + printf("%s [%s/%s]: ", question, yes, no); fflush(NULL); + char answer[16]; fgets(answer, sizeof(answer), stdin); /* Use strncmp here because the answer might contain a newline as |