summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorL0Wigh <mathiotthomas@gmail.com>2025-09-30 15:10:10 +0200
committerL0Wigh <mathiotthomas@gmail.com>2025-09-30 15:10:10 +0200
commit39a0565346f6b1a2001528af58603be834302b86 (patch)
treefff4ab8b210c8ed9b2a346d7acc867cba767f21e
parent91bcb69254ece659e8cf4eba6c4235708955a8ad (diff)
modifying the fix to fit uint23 recommendations
-rw-r--r--src/sxwm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sxwm.c b/src/sxwm.c
index 91aeb8e..65be8b9 100644
--- a/src/sxwm.c
+++ b/src/sxwm.c
@@ -670,11 +670,11 @@ int get_monitor_for(Client *c)
pid_t get_parent_process(pid_t c)
{
- unsigned int v = 0;
+ pid_t v = -1;
FILE *f;
char buf[256];
- snprintf(buf, sizeof(buf) - 1, "/proc/%u/stat", (unsigned)c);
+ snprintf(buf, sizeof(buf), "/proc/%u/stat", (unsigned)c);
if (!(f = fopen(buf, "r"))) {
return 0;
}