Commit Diff
- Commit:
2c986b8f7e0c4aa36f452ee05715a26fac32c39e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
- Message:
- 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@
- Actions:
- Patch | Tree
--- lib/patch.c +++ lib/patch.c @@ -415,11 +415,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++; }