summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-13 12:28:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-13 12:28:37 +0000
commit52aa6ab21dcf2e0c6cb0190fbc4f8276248ade6b (patch)
tree490757266517315416865f290e099d341f018bdf /random.c
parent9a8440e5d46c67f9938b58d7491659d094c7c4b2 (diff)
downloadruby-52aa6ab21dcf2e0c6cb0190fbc4f8276248ade6b.tar.gz
* process.c (rb_fork_err): suppress gcc 4.4 warnings.
* random.c (fill_random_seed): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r--random.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/random.c b/random.c
index 2da40b2bb6..333c593ff5 100644
--- a/random.c
+++ b/random.c
@@ -489,7 +489,9 @@ fill_random_seed(unsigned int seed[DEFAULT_SEED_CNT])
#endif
)) >= 0) {
if (fstat(fd, &statbuf) == 0 && S_ISCHR(statbuf.st_mode)) {
- (void)read(fd, seed, DEFAULT_SEED_LEN);
+ if (read(fd, seed, DEFAULT_SEED_LEN) < DEFAULT_SEED_LEN) {
+ /* abandon */;
+ }
}
close(fd);
}