after log error, reset errno
This commit is contained in:
@@ -181,6 +181,8 @@ int ssl_init(void)
|
||||
if ((fd = open("/dev/urandom", O_RDONLY)) == -1)
|
||||
{
|
||||
TFE_LOG_ERROR(NULL, "Error opening /dev/urandom for reading: %s", strerror(errno));
|
||||
/* after log, reset errno */
|
||||
errno = 0;
|
||||
goto __errout;
|
||||
}
|
||||
|
||||
@@ -189,6 +191,8 @@ int ssl_init(void)
|
||||
if (read(fd, buf, sizeof(buf)) == -1)
|
||||
{
|
||||
TFE_LOG_ERROR(NULL, "Error reading from /dev/urandom: %s", strerror(errno));
|
||||
/* after log, reset errno */
|
||||
errno = 0;
|
||||
goto __errout;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user