diff options
author | David Robillard <d@drobilla.net> | 2018-12-30 17:45:07 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-01-05 18:55:50 +0100 |
commit | 04e6f01432a5888a6abf95d6dfdec8094c380e70 (patch) | |
tree | 23ecb0b8d9ad21fa1caa5ca7b035e8ba60d7db2c /src/uri.c | |
parent | bb9d51a0f607ebe8d3802f7880ef588420cb9394 (diff) | |
download | serd-04e6f01432a5888a6abf95d6dfdec8094c380e70.tar.gz serd-04e6f01432a5888a6abf95d6dfdec8094c380e70.tar.bz2 serd-04e6f01432a5888a6abf95d6dfdec8094c380e70.zip |
Rewrite switch statements that are better written as ifs
Diffstat (limited to 'src/uri.c')
-rw-r--r-- | src/uri.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -188,12 +188,10 @@ query: if (*ptr == '?') { out->query.buf = ++ptr; for (uint8_t c; (c = *ptr) != '\0'; ++ptr) { - switch (c) { - case '#': + if (c == '#') { goto fragment; - default: - ++out->query.len; } + ++out->query.len; } } |