David Baron fix for valgrind report of UMR r=wtchang sr=Nelson

This commit is contained in:
glen.beasley%sun.com 2006-04-04 01:01:51 +00:00
Родитель 4e1be18bf7
Коммит fcf0285383
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -959,6 +959,9 @@ size_t RNG_FileUpdate(const char *fileName, size_t limit)
unsigned char buffer[BUFSIZ];
static size_t totalFileBytes = 0;
/* suppress valgrind warnings due to holes in struct stat */
memset(&stat_buf, 0, sizeof(stat_buf));
if (stat((char *)fileName, &stat_buf) < 0)
return fileBytes;
RNG_RandomUpdate(&stat_buf, sizeof(stat_buf));