diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2020-09-04 09:52:02 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2020-09-04 09:52:59 +0200 |
| commit | d6c07484e90a4ff4cde119ca2c9eb57417f6cd1c (patch) | |
| tree | 975ec7259ad51150272da81ca3e1c63671dcc2b0 /man1 | |
| parent | d9f42b52cb26406ab73616bcd6ccf88c941082bd (diff) | |
| download | man-pages-d6c07484e90a4ff4cde119ca2c9eb57417f6cd1c.tar.gz | |
memusage.1: Use %zu rather than %zd when printing 'size_t' values
'size_t' is an unsigned type...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man1')
| -rw-r--r-- | man1/memusage.1 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/man1/memusage.1 b/man1/memusage.1 index 10fa18aee7..cede2df3d4 100644 --- a/man1/memusage.1 +++ b/man1/memusage.1 @@ -249,7 +249,7 @@ main(int argc, char *argv[]) int *p; size = sizeof(*p) * 100; - printf("malloc: %zd\en", size); + printf("malloc: %zu\en", size); p = malloc(size); for (i = 0; i < CYCLES; i++) { @@ -259,11 +259,11 @@ main(int argc, char *argv[]) j--; size = sizeof(*p) * (j * 50 + 110); - printf("realloc: %zd\en", size); + printf("realloc: %zu\en", size); p = realloc(p, size); size = sizeof(*p) * ((j + 1) * 150 + 110); - printf("realloc: %zd\en", size); + printf("realloc: %zu\en", size); p = realloc(p, size); } |
