[ttssh2-commit] [10258] getentropy() の返り値がインポート元と同じになるようにした

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2022年 9月 11日 (日) 06:27:18 JST


Revision: 10258
          https://osdn.net/projects/ttssh2/scm/svn/commits/10258
Author:   nmaya
Date:     2022-09-11 06:27:17 +0900 (Sun, 11 Sep 2022)
Log Message:
-----------
getentropy() の返り値がインポート元と同じになるようにした

Modified Paths:
--------------
    trunk/ttssh2/ttxssh/arc4random.c

-------------- next part --------------
Modified: trunk/ttssh2/ttxssh/arc4random.c
===================================================================
--- trunk/ttssh2/ttxssh/arc4random.c	2022-09-10 15:29:18 UTC (rev 10257)
+++ trunk/ttssh2/ttxssh/arc4random.c	2022-09-10 21:27:17 UTC (rev 10258)
@@ -93,7 +93,7 @@
 		return (-1);
 	}
 
-	return (1);
+	return (0);
 }
 #endif /* LIBRESSL_VERSION_NUMBER */
 
@@ -107,7 +107,7 @@
 		return;
 	}
 #else
-	if (getentropy(rnd, sizeof(rnd)) <= 0) {
+	if (getentropy(rnd, sizeof(rnd)) == -1) {
 		return;
 	}
 #endif


ttssh2-commit メーリングリストの案内
Back to archive index