summaryrefslogtreecommitdiff
path: root/tools/image-host.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-11-19 10:23:50 -0500
committerTom Rini <trini@konsulko.com>2020-11-19 10:23:50 -0500
commitb80680633dc954d32f81f3afacd3d1f2f3d290b0 (patch)
treec551b408e9b714348c1f4f34b14a23d4641021b8 /tools/image-host.c
parente800d715e01daffa9a5078c974f4568d6ef9e7c3 (diff)
parentdd4866b43754b18f0c06672e341d93e16b8bf674 (diff)
Merge branch '2020-11-18-assorted-fixes'
- Assorted SquashFS fixes and cleanups - Fixes for various Coverity issues - Various fixups to other platforms / code
Diffstat (limited to 'tools/image-host.c')
-rw-r--r--tools/image-host.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/image-host.c b/tools/image-host.c
index 7cef78eab8f..e32cc642579 100644
--- a/tools/image-host.c
+++ b/tools/image-host.c
@@ -335,14 +335,14 @@ 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;
}
- srand(date.tv_nsec);
+ srandom(date.tv_nsec);
for (i = 0; i < size; i++) {
- *tmp = rand() & 0xff;
+ *tmp = random() & 0xff;
tmp++;
}