diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
commit | 78c0815c4118fe24ab78cce2dc48a6232dcd824a (patch) | |
tree | 8512c50df70b8dd80c919e88ade3419207c95956 /plugins/MirOTR/ekhtml/src/ekhtml_comment.c | |
parent | ce816d83a8c75808e0eb06832592bffefe4a8dc4 (diff) |
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR/ekhtml/src/ekhtml_comment.c')
-rw-r--r-- | plugins/MirOTR/ekhtml/src/ekhtml_comment.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/MirOTR/ekhtml/src/ekhtml_comment.c b/plugins/MirOTR/ekhtml/src/ekhtml_comment.c index e37cc487b5..11c4e8cf2e 100644 --- a/plugins/MirOTR/ekhtml/src/ekhtml_comment.c +++ b/plugins/MirOTR/ekhtml/src/ekhtml_comment.c @@ -66,22 +66,22 @@ char *ekhtml_parse_comment(ekhtml_parser_t *parser, void **state_data, if(comstate->dashes == 0){ /* Still on the quest for the double dash*/ /* XXX -- Searching for '--' could be faster, doing multibyte searching, or something similar */ - for(; workp < endp - 1; workp += 2){ - if(*workp == '-') + for (; workp < endp - 1; workp += 2){ + if (*workp == '-') break; } - if(!(workp < endp - 1)){ + if (!(workp < endp - 1)) { *offset = endp - 1 - curp; return NULL; } - if((*(workp - 1) == '-') && + if ((*(workp - 1) == '-') && (workp - curp) > (sizeof("<!--") - 1)) { comstate->lastdash = workp - 1 - curp; comstate->dashes = 1; - } else if(*(workp + 1) == '-'){ + } else if (*(workp + 1) == '-') { comstate->lastdash = workp - curp; comstate->dashes = 1; } else { @@ -99,7 +99,7 @@ char *ekhtml_parse_comment(ekhtml_parser_t *parser, void **state_data, return NULL; } - if(*workp == '>'){ + if (*workp == '>') { if(parser->commentcb){ ekhtml_string_t str; |