about summary refs log tree commit diff
path: root/src/stdlib/strtoumax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/strtoumax.c')
-rw-r--r--src/stdlib/strtoumax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/strtoumax.c b/src/stdlib/strtoumax.c
index a2bb4d7d..a299dc04 100644
--- a/src/stdlib/strtoumax.c
+++ b/src/stdlib/strtoumax.c
@@ -26,7 +26,7 @@ uintmax_t strtoumax(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 UINTMAX_MAX;
 	}