diff options
author | David Robillard <d@drobilla.net> | 2020-12-31 12:37:57 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-12-31 12:37:57 +0100 |
commit | 8a93d0b3be5b6d80a1bef85bc73b2661f5ab4376 (patch) | |
tree | c65c3327fde67505a8f989e57cb245ee0f286cb9 /src/uri_utils.h | |
parent | 19d8a055ff1e58a699e3679b701a1a60a2927243 (diff) | |
download | serd-8a93d0b3be5b6d80a1bef85bc73b2661f5ab4376.tar.gz serd-8a93d0b3be5b6d80a1bef85bc73b2661f5ab4376.tar.bz2 serd-8a93d0b3be5b6d80a1bef85bc73b2661f5ab4376.zip |
Avoid "else" after "break" and "return"
Diffstat (limited to 'src/uri_utils.h')
-rw-r--r-- | src/uri_utils.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/uri_utils.h b/src/uri_utils.h index 7fa87463..d7c90b12 100644 --- a/src/uri_utils.h +++ b/src/uri_utils.h @@ -41,11 +41,8 @@ uri_path_len(const SerdURI* uri) static inline uint8_t uri_path_at(const SerdURI* uri, size_t i) { - if (i < uri->path_base.len) { - return uri->path_base.buf[i]; - } else { - return uri->path.buf[i - uri->path_base.len]; - } + return (i < uri->path_base.len) ? uri->path_base.buf[i] + : uri->path.buf[i - uri->path_base.len]; } /** |