From 9c8b62b8b9b8c3b98beb90e2523b7d990de9b959 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 13 Sep 2012 08:49:44 +0200 Subject: [PATCH] Fix accurate option in the estimate command --- bacula/src/dird/ua_cmds.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c index 9c37032325..0e4fd9d8df 100644 --- a/bacula/src/dird/ua_cmds.c +++ b/bacula/src/dird/ua_cmds.c @@ -1254,9 +1254,14 @@ static int estimate_cmd(UAContext *ua, const char *cmd) } } if (strcasecmp(ua->argk[i], NT_("accurate")) == 0) { - if (!is_yesno(ua->argv[i], &accurate)) { - ua->error_msg(_("Invalid value for accurate. " - "It must be yes or no.\n")); + if (ua->argv[i]) { + if (!is_yesno(ua->argv[i], &accurate)) { + ua->error_msg(_("Invalid value for accurate. " + "It must be yes or no.\n")); + } + continue; + } else { + ua->error_msg(_("Accurate value missing.\n")); } } } -- 2.39.5