Re: [hackers] [dwm] [PATCH] use correct conversion specifier for an unsigned integer

2023-01-16 Thread Tom Schwindl
>
> I think %d is fine and correct here too.
>
> -- 
> Kind regards,
> Hiltjo

Indeed. I was wondering about this since it looks inconsistent to me.
But to be fair, in reality this will probably never be problem.

--
Best Regards,
Tom Schwindl



Re: [hackers] [dwm] [PATCH] use correct conversion specifier for an unsigned integer

2023-01-15 Thread Hiltjo Posthuma
On Sat, Jan 14, 2023 at 11:08:39PM +, Tom Schwindl wrote:
> ---
>  dwm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dwm.c b/dwm.c
> index 03baf42b3502..d832678ab5aa 100644
> --- a/dwm.c
> +++ b/dwm.c
> @@ -1121,7 +1121,7 @@ monocle(Monitor *m)
>   if (ISVISIBLE(c))
>   n++;
>   if (n > 0) /* override layout symbol */
> - snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
> + snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%u]", n);
>   for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
>   resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 
> 0);
>  }
> -- 
> 2.39.0
> 
> 

I think %d is fine and correct here too.

-- 
Kind regards,
Hiltjo