about summary refs log tree commit diff
path: root/src/stdlib/strtoimax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/strtoimax.c')
-rw-r--r--src/stdlib/strtoimax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/strtoimax.c b/src/stdlib/strtoimax.c
index 247f91d4..671aa287 100644
--- a/src/stdlib/strtoimax.c
+++ b/src/stdlib/strtoimax.c
@@ -25,7 +25,7 @@ intmax_t strtoimax(const char *s1, char **p, int base)
 
 	if (ip.err) {
 		errno = ip.err;
-		if (ip.err = EINVAL) return 0;
+		if (ip.err == EINVAL) return 0;
 		return ip.neg ? INTMAX_MIN : INTMAX_MAX;
 	}