OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd8056b
)
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
Matthias Clasen
<mclasen@redhat.com>
Sat, 14 Jul 2012 20:33:15 +0000
(16:33 -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)
{