summaryrefslogtreecommitdiff
path: root/src/htsserver.h
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-08-17 07:57:44 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-08-17 07:57:44 +0000
commit5ab61bd6e3c21d35ed418613676f3be86fd78869 (patch)
treeddfa6a5c4ba49eb33655a610d7d2de684cb0d7de /src/htsserver.h
parent1e12f60120e2390ba93c83d906839fdcb38107f0 (diff)
Some cleanup in obviously wrong 15-year-old code.
Diffstat (limited to 'src/htsserver.h')
-rw-r--r--src/htsserver.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/htsserver.h b/src/htsserver.h
index 27ba90d..51a44b2 100644
--- a/src/htsserver.h
+++ b/src/htsserver.h
@@ -273,9 +273,9 @@ static int ehex(char *s) {
}
HTS_UNUSED static void unescapehttp(char *s, String * tempo) {
- int i;
+ size_t i;
- for(i = 0; i < (int) strlen(s); i++) {
+ for(i = 0; i < s[i] != '\0'; i++) {
if (s[i] == '%' && s[i + 1] == '%') {
i++;
StringAddchar(*tempo, '%');
@@ -294,10 +294,10 @@ HTS_UNUSED static void unescapehttp(char *s, String * tempo) {
}
HTS_UNUSED static void unescapeini(char *s, String * tempo) {
- int i;
+ size_t i;
char lastc = 0;
- for(i = 0; i < (int) strlen(s); i++) {
+ for(i = 0; s[i] != '\0'; i++) {
if (s[i] == '%' && s[i + 1] == '%') {
i++;
StringAddchar(*tempo, lastc = '%');