diff options
author | David Robillard <d@drobilla.net> | 2018-12-30 17:45:07 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-12-30 17:45:07 -0500 |
commit | a0fa76d5005e53f4cb45919fe57d5411054e8af4 (patch) | |
tree | 23ecb0b8d9ad21fa1caa5ca7b035e8ba60d7db2c /src/uri.c | |
parent | 276ec06bcaa2b1a5d22a8607dae6bb42d46813db (diff) | |
download | serd-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.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; } } |