diff options
author | Philippe Reynes <philippe.reynes@softathome.com> | 2020-11-13 15:15:18 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-11-19 09:45:49 -0500 |
commit | 26927493161e16d90101c8a6abae551597d46e72 (patch) | |
tree | 30aecebb0ac1447375653d268691a5d79f269e0f /tools | |
parent | cc34f04efd63dfdd31ef2dbfd46c15fb485b2888 (diff) | |
download | u-boot-26927493161e16d90101c8a6abae551597d46e72.zip u-boot-26927493161e16d90101c8a6abae551597d46e72.tar.gz u-boot-26927493161e16d90101c8a6abae551597d46e72.tar.bz2 |
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 <philippe.reynes@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/image-host.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |