libc: simplify Waitmsg

This commit is contained in:
Giacomo Tesio 2017-05-26 01:55:09 +02:00
parent 5ca0ef085c
commit 40ccb89835
2 changed files with 1 additions and 2 deletions

View File

@ -594,7 +594,7 @@ struct Waitmsg
{ {
pid_t pid; /* of loved one */ pid_t pid; /* of loved one */
uint32_t time[3]; /* of loved one & descendants */ uint32_t time[3]; /* of loved one & descendants */
char *msg; char msg[];
} Waitmsg; } Waitmsg;
extern int jehanne_access(const char*, int); extern int jehanne_access(const char*, int);

View File

@ -34,7 +34,6 @@ jehanne_wait(void)
w->time[0] = jehanne_atoi(fld[1]); w->time[0] = jehanne_atoi(fld[1]);
w->time[1] = jehanne_atoi(fld[2]); w->time[1] = jehanne_atoi(fld[2]);
w->time[2] = jehanne_atoi(fld[3]); w->time[2] = jehanne_atoi(fld[3]);
w->msg = (char*)&w[1];
jehanne_memmove(w->msg, fld[4], l); jehanne_memmove(w->msg, fld[4], l);
return w; return w;
} }