Skip to content

Commit bba69ec

Browse files
committed
[C] Set errno = 0 before reading an env property for context.
1 parent f9b5250 commit bba69ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

aeron-driver/src/main/c/aeron_driver_context.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,10 @@ uint64_t aeron_config_parse_uint64(const char *str, uint64_t def, uint64_t min,
124124

125125
if (NULL != str)
126126
{
127+
errno = 0;
127128
uint64_t value = strtoull(str, NULL, 0);
128129

129-
if (0 == value && EINVAL == errno)
130+
if (0 == value && 0 != errno)
130131
{
131132
value = def;
132133
}

0 commit comments

Comments
 (0)