diff options
| author | Richard Henderson | 2019-03-14 04:47:32 +0100 |
|---|---|---|
| committer | Richard Henderson | 2019-05-22 18:38:54 +0200 |
| commit | 25fb26e4f4b7cd50b9a7314400a2f800a4082b71 (patch) | |
| tree | 294e9e3735a2f0a34f05b9ce877ad6ae3e2432f2 /include | |
| parent | crypto: Reverse code blocks in random-platform.c (diff) | |
| download | qemu-25fb26e4f4b7cd50b9a7314400a2f800a4082b71.tar.gz qemu-25fb26e4f4b7cd50b9a7314400a2f800a4082b71.tar.xz qemu-25fb26e4f4b7cd50b9a7314400a2f800a4082b71.zip | |
crypto: Do not fail for EINTR during qcrypto_random_bytes
We can always get EINTR for read; /dev/urandom is no exception.
Rearrange the order of tests for likelihood; allow degenerate buflen==0
case to perform a no-op zero-length read. This means that the normal
success path is a straight line with a single test for success.
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
