diff options
Diffstat (limited to 'src/uri_utils.h')
-rw-r--r-- | src/uri_utils.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/uri_utils.h b/src/uri_utils.h index 4dbcdba5..28d74be4 100644 --- a/src/uri_utils.h +++ b/src/uri_utils.h @@ -24,8 +24,7 @@ static inline bool chunk_equals(const SerdChunk* a, const SerdChunk* b) { - return a->len == b->len - && !strncmp((const char*)a->buf, (const char*)b->buf, a->len); + return a->len == b->len && !strncmp(a->buf, b->buf, a->len); } static inline size_t @@ -34,7 +33,7 @@ uri_path_len(const SerdURI* uri) return uri->path_base.len + uri->path.len; } -static inline uint8_t +static inline char uri_path_at(const SerdURI* uri, size_t i) { if (i < uri->path_base.len) { @@ -62,8 +61,8 @@ uri_rooted_index(const SerdURI* uri, const SerdURI* root) const size_t root_len = uri_path_len(root); size_t last_root_slash = 0; for (size_t i = 0; i < path_len && i < root_len; ++i) { - const uint8_t u = uri_path_at(uri, i); - const uint8_t r = uri_path_at(root, i); + const char u = uri_path_at(uri, i); + const char r = uri_path_at(root, i); differ = differ || u != r; if (r == '/') { |