Fix Clang compiler warnings.

This commit is contained in:
Justin Maggard
2014-03-07 12:42:40 -08:00
parent 546b12e1a9
commit a606012d23
3 changed files with 10 additions and 9 deletions

3
uuid.c
View File

@ -102,7 +102,8 @@ read_random_bytes(unsigned char *buf, size_t size)
i = open("/dev/urandom", O_RDONLY);
if(i >= 0)
{
if(read(i, buf, size));
if (read(i, buf, size) == -1)
DPRINTF(E_MAXDEBUG, L_GENERAL, "Failed to read random bytes\n");
close(i);
}
/* Paranoia. /dev/urandom may be missing.