commit 2140c6ec5634ddee572383944f0903ab7b0b829f from: Omar Polo via: Thomas Adam date: Mon Jul 04 09:53:09 2022 UTC check for specific chars instead of using isspace(3) Reminded by naddy and stsp; it was missing a cast to unsigned char to prevent issues on archs with signed chars and was too broad anyway. While here, drop an extra check immediately after. ok stsp@ commit - ef0f20a88731571e4b4e9152da6cd4d9aac43c49 commit + 2140c6ec5634ddee572383944f0903ab7b0b829f blob - b31d5584f4116afe5c9013b0835142aedde7d5e2 blob + 82486de5473461070b3bc25188144766e945a929 --- lib/patch.c +++ lib/patch.c @@ -412,11 +412,11 @@ linecmp(const char *a, const char *b, int *mangled) *mangled = 1; for (;;) { - while (isspace(*a)) + while (*a == '\t' || *a == ' ' || *a == '\f') a++; - while (isspace(*b)) + while (*b == '\t' || *b == ' ' || *b == '\f') b++; - if (*a == '\0' || *b == '\0' || *a != *b) + if (*a == '\0' || *a != *b) break; a++, b++; }