mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
Don't repeat a failed fclose() call, since that invokes undefined
2006-04-26 Matthias Clasen <mclasen@redhat.com> * glib/grand.c (g_rand_new): Don't repeat a failed fclose() call, since that invokes undefined behaviour. (Coverity)
This commit is contained in:
committed by
Matthias Clasen
parent
d4ac791e02
commit
b8b28a7206
@@ -191,12 +191,7 @@ g_rand_new (void)
|
||||
if (r != 1)
|
||||
dev_urandom_exists = FALSE;
|
||||
|
||||
do
|
||||
{
|
||||
errno = 0;
|
||||
fclose (dev_urandom);
|
||||
}
|
||||
while G_UNLIKELY (errno == EINTR);
|
||||
fclose (dev_urandom);
|
||||
}
|
||||
else
|
||||
dev_urandom_exists = FALSE;
|
||||
|
Reference in New Issue
Block a user