Re: [hackers] [dwm][PATCH RESEND 0/2] Const-correctness fixes

From: Quentin Rameau <quinq_AT_fifth.space>
Date: Mon, 22 Aug 2022 11:29:04 +0200

Hi NRK,

---
 dwm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dwm.c b/dwm.c
index 253aba7..55dd68c 100644
--- a/dwm.c
+++ b/dwm.c
_AT_@ -1808,7 +1808,8 @@ updatebars(void)
 		.background_pixmap = ParentRelative,
 		.event_mask = ButtonPressMask|ExposureMask
 	};
-	XClassHint ch = {"dwm", "dwm"};
+	char s[] = "dwm";
+	XClassHint ch = { s, s };
 	for (m = mons; m; m = m->next) {
 		if (m->barwin)
 			continue;
-- 
I don't think that this change is necessary, strings pointed to by
XClassHint members are not modified, they're copied when necessary.
Received on Mon Aug 22 2022 - 11:29:04 CEST

This archive was generated by hypermail 2.3.0 : Mon Aug 22 2022 - 11:36:43 CEST