diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-09-23 17:46:46 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-09-23 17:46:46 -0700 |
| commit | 1727d9b75c93051c3f46d3154256c8f3a78911a6 (patch) | |
| tree | eca8b0ca8f925f57bde2526013225dc2fcde15f9 /utils.c | |
| parent | c81601729ea2d1f7ef6aab14fec0e19ee326b740 (diff) | |
Use strncasecmp and memmem instead of custom logic.
Diffstat (limited to 'utils.c')
| -rw-r--r-- | utils.c | 12 |
1 files changed, 0 insertions, 12 deletions
@@ -128,18 +128,6 @@ char unescapechar(const char *escaped, const char **end) } // -// Case-insensitive memory comparison -// -int memicmp(const void *v1, const void *v2, size_t n) -{ - int result = 0; - const char *s1 = (const char*)v1, *s2 = (const char*)v2; - while (n-- > 0 && (result = tolower(*(s1++)) - tolower(*(s2++))) == 0) - ; - return result; -} - -// // Free memory, but also set the pointer to NULL for safety // void delete(void *p) |
