From: John L. Hammond Date: Wed, 14 Feb 2018 18:27:54 +0000 (-0600) Subject: LU-10663 utils: clear errno before check X-Git-Tag: 2.10.4-RC1~83 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=d140cab6f9bbef3d7f77b91628fe8202517fa185;p=fs%2Flustre-release.git LU-10663 utils: clear errno before check In jt_obd_destroy() clear errno before calling strtoull() and checking it. Test-Parameters: testlist=obdfilter-survey Lustre-change: https://review.whamcloud.com/#/c/31305/ Lustre-commit: 9e488fe9413184e61dcf405c9c87ca348dd6824a Signed-off-by: John L. Hammond Change-Id: I686cd6eb0a57248177e5b0878df5e3f450fbc942 Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/31430 Reviewed-by: Bob Glossman Tested-by: Jenkins Tested-by: Maloo --- diff --git a/lustre/utils/obd.c b/lustre/utils/obd.c index 2e84177..249b182 100644 --- a/lustre/utils/obd.c +++ b/lustre/utils/obd.c @@ -1712,6 +1712,7 @@ int jt_obd_destroy(int argc, char **argv) if (argc < 2 || argc > 4) return CMD_HELP; + errno = 0; id = strtoull(argv[1], &end, 0); if (*end || id == 0 || errno != 0) { fprintf(stderr, "error: %s: invalid objid '%s'\n",