summaryrefslogtreecommitdiffstats
path: root/html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-10-28 06:54:12 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-10-28 06:54:12 +0000
commit727efc61ff79f9a152dc0ec1ff6aae25907a32fb (patch)
tree4919a45cb2e01c50fd77d5632256212512e26a16 /html.c
parente610e710af132c1cfeed06eb0da987c4ab7af35d (diff)
downloadmandoc-727efc61ff79f9a152dc0ec1ff6aae25907a32fb.tar.gz
Removed superfluous memset (thanks Joerg Sonnenberger).
Diffstat (limited to 'html.c')
-rw-r--r--html.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/html.c b/html.c
index 7a087072..041e1061 100644
--- a/html.c
+++ b/html.c
@@ -670,26 +670,24 @@ html_idcat(char *dst, const char *src, int sz)
for (i = 0; *dst != '\0' && i < sz - 1; dst++, i++)
/* Jump to end. */ ;
- for ( ; *src != '\0' && i < sz - 1; src++, i++) {
+ for ( ; *src != '\0' && i < sz - 1; src++, i++, dst++) {
if (isalnum((u_char)*src)) {
- *dst++ = *src;
+ *dst = *src;
continue;
}
switch (*src) {
case (';'):
- *dst++ = ';';
+ *dst = ';';
break;
case ('-'):
- *dst++ = '-';
+ *dst = '-';
break;
case (':'):
- *dst++ = ':';
+ *dst = ':';
break;
- case ('_'):
- /* FALLTHROUGH */
default:
- *dst++ = '_';
+ *dst = '_';
break;
}
}