summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-03-06 12:32:41 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-03-06 12:32:41 +0000
commitc83c21a92cc24c2fa1208ec948dcc22fcc247cc5 (patch)
treed843bab30307514bad086d844182546b7dfb3d0e
parentae3ea99fc0b9d129c98a5d84c6c8d98b3475de27 (diff)
downloadmandoc-c83c21a92cc24c2fa1208ec948dcc22fcc247cc5.tar.gz
drop redundant '0' flag from "%02.2X" format string;
found by a compiler warning from gcc 4.9.2 on Linux
-rw-r--r--cgi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cgi.c b/cgi.c
index dc88b08a..e2967689 100644
--- a/cgi.c
+++ b/cgi.c
@@ -324,7 +324,7 @@ http_encode(const char *p)
for (; *p != '\0'; p++) {
if (isalnum((unsigned char)*p) == 0 &&
strchr("-._~", *p) == NULL)
- printf("%%%02.2X", (unsigned char)*p);
+ printf("%%%2.2X", (unsigned char)*p);
else
putchar(*p);
}