projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01d8d43
)
GRand: Check return value of fopen directly
author
Colin Walters
<walters@verbum.org>
Thu, 21 Jun 2012 19:44:16 +0000
(15:44 -0400)
committer
Colin Walters
<walters@verbum.org>
Fri, 22 Jun 2012 14:34:46 +0000
(10:34 -0400)
This doesn't fix anything, it should just silence some static analysis
tools.
glib/grand.c
patch
|
blob
|
history
diff --git
a/glib/grand.c
b/glib/grand.c
index
0405628
..
4d6a0a6
100644
(file)
--- a/
glib/grand.c
+++ b/
glib/grand.c
@@
-216,11
+216,10
@@
g_rand_new (void)
FILE* dev_urandom;
do
- {
- errno = 0;
+ {
dev_urandom = fopen("/dev/urandom", "rb");
}
- while G_UNLIKELY (errno == EINTR);
+ while G_UNLIKELY (
dev_urandom == NULL &&
errno == EINTR);
if (dev_urandom)
{