[前][次][番号順一覧][スレッド一覧]

ruby-changes:39105

From: kazu <ko1@a...>
Date: Tue, 7 Jul 2015 18:21:22 +0900 (JST)
Subject: [ruby-changes:39105] kazu:r51186 (trunk): * random.c (fill_random_bytes_syscall): fix compile error.

kazu	2015-07-07 18:21:11 +0900 (Tue, 07 Jul 2015)

  New Revision: 51186

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51186

  Log:
    * random.c (fill_random_bytes_syscall): fix compile error.

  Modified files:
    trunk/ChangeLog
    trunk/random.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51185)
+++ ChangeLog	(revision 51186)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Jul  7 18:18:41 2015  Kazuhiro NISHIYAMA  <zn@m...>
+
+	* random.c (fill_random_bytes_syscall): fix compile error.
+
 Tue Jul  7 16:47:30 2015  Eric Wong  <e@8...>
 
 	* compile.c (COMPILE_ERROR): reduce GET_THREAD() calls
Index: random.c
===================================================================
--- random.c	(revision 51185)
+++ random.c	(revision 51186)
@@ -521,12 +521,13 @@ fill_random_bytes_syscall(void *seed, si https://github.com/ruby/ruby/blob/trunk/random.c#L521
 {
     static rb_atomic_t try_syscall = 1;
     if (try_syscall) {
+	int ret;
 	errno = 0;
-	ret = syscall(SYS_getrandom, seed, size, 0)
-	    if (errno == ENOSYS) {
-		try_syscall = 0;
-		return -1;
-	    }
+	ret = syscall(SYS_getrandom, seed, size, 0);
+	if (errno == ENOSYS) {
+	    try_syscall = 0;
+	    return -1;
+	}
 	if ((size_t)ret == size) return 0;
     }
     return -1;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]