diff --git a/src/shared-macro.h b/src/shared-macro.h index 9f9dba28..4ef015f8 100644 --- a/src/shared-macro.h +++ b/src/shared-macro.h @@ -235,13 +235,13 @@ static inline bool streq_ptr(const char *a, const char *b) * This returns a pointer to the first character in @s that follows @prefix. If * @s does not start with @prefix, NULL is returned. */ -static inline char *startswith(const char *s, const char *prefix) +static inline const char *startswith(const char *s, const char *prefix) { size_t l; l = strlen(prefix); if (strncmp(s, prefix, l) == 0) - return (char*) s + l; + return s + l; return NULL; }