From: Philippe Reynes Date: Fri, 13 Nov 2020 14:15:18 +0000 (+0100) Subject: tools: image-host.c: use correct variable for strerrno X-Git-Tag: v2021.10~426^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=26927493161e16d90101c8a6abae551597d46e72;p=platform%2Fkernel%2Fu-boot.git tools: image-host.c: use correct variable for strerrno In the function get_random_data, strerrno is called with the variable ret (which is the return of the function clock_gettime). It should be called with errnor. This commit fixes this mistake. Reported-by: Coverity (CID: 312956) Signed-off-by: Philippe Reynes Reviewed-by: Simon Glass --- diff --git a/tools/image-host.c b/tools/image-host.c index 5e1dec2..e32cc64 100644 --- a/tools/image-host.c +++ b/tools/image-host.c @@ -335,7 +335,7 @@ static int get_random_data(void *data, int size) ret = clock_gettime(CLOCK_MONOTONIC, &date); if (ret < 0) { printf("%s: clock_gettime has failed (err=%d, str=%s)\n", - __func__, ret, strerror(ret)); + __func__, ret, strerror(errno)); goto out; }