public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pthread_getattr_np.3: Use "%zu" and "%zx" when printing 'size_t' values
@ 2020-09-07 20:17 Alejandro Colomar
  2020-09-07 20:22 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: Alejandro Colomar @ 2020-09-07 20:17 UTC (permalink / raw)
  To: mtk.manpages; +Cc: linux-man, Alejandro Colomar

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
 man3/pthread_getattr_np.3 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/man3/pthread_getattr_np.3 b/man3/pthread_getattr_np.3
index 863a44819..2989381e8 100644
--- a/man3/pthread_getattr_np.3
+++ b/man3/pthread_getattr_np.3
@@ -213,7 +213,7 @@ display_stack_related_attributes(pthread_attr_t *attr, char *prefix)
     s = pthread_attr_getguardsize(attr, &guard_size);
     if (s != 0)
         handle_error_en(s, "pthread_attr_getguardsize");
-    printf("%sGuard size          = %d bytes\en", prefix, guard_size);
+    printf("%sGuard size          = %zu bytes\en", prefix, guard_size);
 
     s = pthread_attr_getstack(attr, &stack_addr, &stack_size);
     if (s != 0)
@@ -222,7 +222,7 @@ display_stack_related_attributes(pthread_attr_t *attr, char *prefix)
     if (stack_size > 0)
         printf(" (EOS = %p)", (char *) stack_addr + stack_size);
     printf("\en");
-    printf("%sStack size          = 0x%x (%d) bytes\en",
+    printf("%sStack size          = 0x%zx (%zu) bytes\en",
             prefix, stack_size, stack_size);
 }
 
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] pthread_getattr_np.3: Use "%zu" and "%zx" when printing 'size_t' values
  2020-09-07 20:17 [PATCH] pthread_getattr_np.3: Use "%zu" and "%zx" when printing 'size_t' values Alejandro Colomar
@ 2020-09-07 20:22 ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-09-07 20:22 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: mtk.manpages, linux-man

On 9/7/20 10:17 PM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>

Thanks, Alex. Patch applied.

Cheers,

Michael

> ---
>  man3/pthread_getattr_np.3 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/man3/pthread_getattr_np.3 b/man3/pthread_getattr_np.3
> index 863a44819..2989381e8 100644
> --- a/man3/pthread_getattr_np.3
> +++ b/man3/pthread_getattr_np.3
> @@ -213,7 +213,7 @@ display_stack_related_attributes(pthread_attr_t *attr, char *prefix)
>      s = pthread_attr_getguardsize(attr, &guard_size);
>      if (s != 0)
>          handle_error_en(s, "pthread_attr_getguardsize");
> -    printf("%sGuard size          = %d bytes\en", prefix, guard_size);
> +    printf("%sGuard size          = %zu bytes\en", prefix, guard_size);
>  
>      s = pthread_attr_getstack(attr, &stack_addr, &stack_size);
>      if (s != 0)
> @@ -222,7 +222,7 @@ display_stack_related_attributes(pthread_attr_t *attr, char *prefix)
>      if (stack_size > 0)
>          printf(" (EOS = %p)", (char *) stack_addr + stack_size);
>      printf("\en");
> -    printf("%sStack size          = 0x%x (%d) bytes\en",
> +    printf("%sStack size          = 0x%zx (%zu) bytes\en",
>              prefix, stack_size, stack_size);
>  }
>  
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-07 20:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-07 20:17 [PATCH] pthread_getattr_np.3: Use "%zu" and "%zx" when printing 'size_t' values Alejandro Colomar
2020-09-07 20:22 ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox