Commit 26927493 authored by Philippe Reynes's avatar Philippe Reynes Committed by Tom Rini
Browse files

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: default avatarPhilippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent cc34f04e
...@@ -335,7 +335,7 @@ static int get_random_data(void *data, int size) ...@@ -335,7 +335,7 @@ static int get_random_data(void *data, int size)
ret = clock_gettime(CLOCK_MONOTONIC, &date); ret = clock_gettime(CLOCK_MONOTONIC, &date);
if (ret < 0) { if (ret < 0) {
printf("%s: clock_gettime has failed (err=%d, str=%s)\n", printf("%s: clock_gettime has failed (err=%d, str=%s)\n",
__func__, ret, strerror(ret)); __func__, ret, strerror(errno));
goto out; goto out;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment