Correct printf arguments and use asprintf

Origin: http://marc.info/?l=openbsd-ports&m=142090828929750&w=2

* Str.c: Use asprintf() instead of rolling our own printf string
length detection.

* cookie.c: Pass the char pointer in the string struct to printf %s
instead of the string struct itself.
Print time_t using %lld instead of %ld to allow for 64-bit time_t.

* main.c: Print a long int using the correct format specifier.

* map.c: Print size_t using the correct format specifier.
This commit is contained in:
Scarlett
2015-01-15 18:54:54 +09:00
committed by Tatsuya Kinoshita
parent dae53252fb
commit ec8272d8fe
4 changed files with 24 additions and 100 deletions

2
map.c
View File

@@ -573,7 +573,7 @@ page_info_panel(Buffer *buf)
"<tr valign=top><td nowrap>Number of lines<td>",
Sprintf("%d", all)->ptr,
"<tr valign=top><td nowrap>Transferred bytes<td>",
Sprintf("%d", buf->trbyte)->ptr, NULL);
Sprintf("%zu", buf->trbyte)->ptr, NULL);
a = retrieveCurrentAnchor(buf);
if (a != NULL) {