From: Danny Al-Gaaf Date: Thu, 21 May 2015 22:35:46 +0000 (+0200) Subject: test/librbd/fsx.cc: fix int/unsigned long conversion X-Git-Tag: v9.0.2~68^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cc1ff9b4565f7fb9ead97ab7aa5a92597bdd081f;p=ceph.git test/librbd/fsx.cc: fix int/unsigned long conversion getnum() returns an integer while maxfilelen is a unsinged long. Use a temp var to be able to check the result of the call. Signed-off-by: Danny Al-Gaaf --- diff --git a/src/test/librbd/fsx.cc b/src/test/librbd/fsx.cc index da93263d2299..427401acebbe 100644 --- a/src/test/librbd/fsx.cc +++ b/src/test/librbd/fsx.cc @@ -2023,9 +2023,10 @@ main(int argc, char **argv) usage(); break; case 'l': - maxfilelen = getnum(optarg, &endp); - if (maxfilelen <= 0) + int _num = getnum(optarg, &endp); + if (_num <= 0) usage(); + maxfilelen = _num; break; case 'm': monitorstart = getnum(optarg, &endp);