From bdf66337183db0fed67195c2833d6e3b2ca4b190 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 15 Jun 2014 10:38:48 +0200 Subject: [PATCH] Fix limit bandwidth calculation --- bacula/src/dird/ua_cmds.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c index f13f090081..9e62afc8c2 100644 --- a/bacula/src/dird/ua_cmds.c +++ b/bacula/src/dird/ua_cmds.c @@ -685,11 +685,11 @@ static int setbwlimit_client(UAContext *ua, CLIENT *client, char *Job, int64_t l static int setbwlimit_cmd(UAContext *ua, const char *cmd) { int action = -1; - CLIENT *client=NULL; + CLIENT *client = NULL; char Job[MAX_NAME_LENGTH]; *Job=0; - int64_t limit=-1; - JCR *jcr=NULL; + int64_t limit = -1; + JCR *jcr = NULL; int i; const char *lst_all[] = { "job", "jobid", "jobname", "client", NULL }; @@ -706,13 +706,13 @@ static int setbwlimit_cmd(UAContext *ua, const char *cmd) i = find_arg_with_value(ua, "limit"); if (i >= 0) { - limit = atoi(ua->argv[i]) * 1024; + limit = atoi(ua->argv[i]) * 1024L; } if (limit < 0) { if (!get_pint(ua, _("Enter new bandwidth limit kb/s: "))) { return 1; } - limit = ua->pint32_val * 1024; /* kb/s */ + limit = ua->pint32_val * 1024L; /* kb/s */ } const char *lst[] = { "job", "jobid", "jobname", NULL }; -- 2.39.5