aboutsummaryrefslogtreecommitdiffstats
path: root/src/content-parser.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-01-22 19:57:24 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-01-22 19:57:24 +0100
commit254b2f23440cb9360cf2e19906d0b56256412e26 (patch)
treeedcb7d67711e5835b542f6b3b6b98aea7fe14673 /src/content-parser.c
parentcb132cf02e57f57f4507fbc0126481629d83f209 (diff)
downloadblogc-254b2f23440cb9360cf2e19906d0b56256412e26.tar.gz
blogc-254b2f23440cb9360cf2e19906d0b56256412e26.tar.bz2
blogc-254b2f23440cb9360cf2e19906d0b56256412e26.zip
content-parser: use size_t instead of unsigned len when handling strings
Diffstat (limited to 'src/content-parser.c')
-rw-r--r--src/content-parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/content-parser.c b/src/content-parser.c
index 5b85586..1a929e2 100644
--- a/src/content-parser.c
+++ b/src/content-parser.c
@@ -27,7 +27,7 @@ blogc_slugify(const char *str)
return NULL;
char *new_str = b_strdup(str);
int diff = 'a' - 'A'; // just to avoid magic numbers
- for (unsigned int i = 0; new_str[i] != '\0'; i++) {
+ for (size_t i = 0; new_str[i] != '\0'; i++) {
if (new_str[i] >= 'a' && new_str[i] <= 'z')
continue;
if (new_str[i] >= '0' && new_str[i] <= '9')
@@ -47,7 +47,7 @@ blogc_htmlentities(const char *str)
if (str == NULL)
return NULL;
b_string_t *rv = b_string_new();
- for (unsigned int i = 0; str[i] != '\0'; i++) {
+ for (size_t i = 0; str[i] != '\0'; i++) {
switch (str[i]) {
case '&':
b_string_append(rv, "&amp;");