summaryrefslogtreecommitdiffstats
path: root/libnetdata/url/url.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:49:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 12:42:05 +0000
commit2e85f9325a797977eea9dfea0a925775ddd211d9 (patch)
tree452c7f30d62fca5755f659b99e4e53c7b03afc21 /libnetdata/url/url.c
parentReleasing debian version 1.19.0-4. (diff)
downloadnetdata-2e85f9325a797977eea9dfea0a925775ddd211d9.tar.xz
netdata-2e85f9325a797977eea9dfea0a925775ddd211d9.zip
Merging upstream version 1.29.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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 d1d508139..3de94fde7 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++;
}