Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 39b1025

Browse files
committed
Fix typo and move comment to appropriate condition
1 parent 553245c commit 39b1025

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Python/random.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
7575
return 0;
7676
}
7777

78+
/* Issue #25003: Don't use getentropy() on Solaris (available since
79+
* Solaris 11.3), it is blocking whereas os.urandom() should not block. */
7880
#elif defined(HAVE_GETENTROPY) && !defined(sun)
7981
#define PY_GETENTROPY 1
8082

@@ -114,8 +116,6 @@ py_getentropy(unsigned char *buffer, Py_ssize_t size, int fatal)
114116

115117
#else
116118

117-
/* Issue #25003: Don' use getentropy() on Solaris (available since
118-
* Solaris 11.3), it is blocking whereas os.urandom() should not block. */
119119
#if defined(HAVE_GETRANDOM) || defined(HAVE_GETRANDOM_SYSCALL)
120120
#define PY_GETRANDOM 1
121121

0 commit comments

Comments
 (0)