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

From: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Sun, 15 Jan 2023 11:21:23 +0100

On Sat, Jan 14, 2023 at 11:08:39PM +0000, 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
> _AT_@ -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
Received on Sun Jan 15 2023 - 11:21:23 CET

This archive was generated by hypermail 2.3.0 : Sun Jan 15 2023 - 11:24:32 CET