From 40ccb89835d361d693fbd0d58068cc543ba9e331 Mon Sep 17 00:00:00 2001 From: Giacomo Tesio Date: Fri, 26 May 2017 01:55:09 +0200 Subject: [PATCH] libc: simplify Waitmsg --- sys/include/libc.h | 2 +- sys/src/lib/c/9sys/wait.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/include/libc.h b/sys/include/libc.h index 89e03b7..4631269 100644 --- a/sys/include/libc.h +++ b/sys/include/libc.h @@ -594,7 +594,7 @@ struct Waitmsg { pid_t pid; /* of loved one */ uint32_t time[3]; /* of loved one & descendants */ - char *msg; + char msg[]; } Waitmsg; extern int jehanne_access(const char*, int); diff --git a/sys/src/lib/c/9sys/wait.c b/sys/src/lib/c/9sys/wait.c index e3dfe61..b19f871 100644 --- a/sys/src/lib/c/9sys/wait.c +++ b/sys/src/lib/c/9sys/wait.c @@ -34,7 +34,6 @@ jehanne_wait(void) w->time[0] = jehanne_atoi(fld[1]); w->time[1] = jehanne_atoi(fld[2]); w->time[2] = jehanne_atoi(fld[3]); - w->msg = (char*)&w[1]; jehanne_memmove(w->msg, fld[4], l); return w; }