aboutsummaryrefslogtreecommitdiffstats
path: root/src/uri.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-12-30 17:45:07 -0500
committerDavid Robillard <d@drobilla.net>2019-01-05 18:55:50 +0100
commit04e6f01432a5888a6abf95d6dfdec8094c380e70 (patch)
tree23ecb0b8d9ad21fa1caa5ca7b035e8ba60d7db2c /src/uri.c
parentbb9d51a0f607ebe8d3802f7880ef588420cb9394 (diff)
downloadserd-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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/uri.c b/src/uri.c
index 0ee9dade..f347f010 100644
--- a/src/uri.c
+++ b/src/uri.c
@@ -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;
}
}