summaryrefslogtreecommitdiffstats
path: root/libnetdata/url/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnetdata/url/url.c')
-rw-r--r--libnetdata/url/url.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libnetdata/url/url.c b/libnetdata/url/url.c
index d1d50813..3de94fde 100644
--- a/libnetdata/url/url.c
+++ b/libnetdata/url/url.c
@@ -31,8 +31,11 @@ char *url_encode(char *str) {
else if (*str == ' ')
*pbuf++ = '+';
- else
- *pbuf++ = '%', *pbuf++ = to_hex(*str >> 4), *pbuf++ = to_hex(*str & 15);
+ else{
+ *pbuf++ = '%';
+ *pbuf++ = to_hex(*str >> 4);
+ *pbuf++ = to_hex(*str & 15);
+ }
str++;
}