dwm

personal fork of dwm (rnpnr branch)
git clone anongit@rnpnr.xyz:dwm.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 2d111562159cef186e334b5402bacb03419971fa
Parent: cfb8627a80a334f200f68c2c8f3e384313ebbaf5
Author: Randy Palamar
Date:   Tue, 24 Dec 2024 13:16:06 -0700

dwm.c: shut up warning about strncpy length

Diffstat:
Mdwm.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dwm.c b/dwm.c @@ -395,7 +395,7 @@ arrange(Monitor *m) void arrangemon(Monitor *m) { - strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof m->ltsymbol); + strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof(m->ltsymbol) - 1); if (m->lt[m->sellt]->arrange) m->lt[m->sellt]->arrange(m); } @@ -1513,7 +1513,7 @@ setlayout(const Arg *arg) selmon->sellt ^= 1; if (arg && arg->v) selmon->lt[selmon->sellt] = (Layout *)arg->v; - strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol); + strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof(selmon->ltsymbol) - 1); if (selmon->sel) arrange(selmon); else