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>2018-12-30 17:45:07 -0500
commita0fa76d5005e53f4cb45919fe57d5411054e8af4 (patch)
tree23ecb0b8d9ad21fa1caa5ca7b035e8ba60d7db2c /src/uri.c
parent276ec06bcaa2b1a5d22a8607dae6bb42d46813db (diff)
downloadserd-a0fa76d5005e53f4cb45919fe57d5411054e8af4.tar.gz
serd-a0fa76d5005e53f4cb45919fe57d5411054e8af4.tar.bz2
serd-a0fa76d5005e53f4cb45919fe57d5411054e8af4.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;
}
}