From: Stefan Sperling Subject: Re: gotwebd: get rid of proc.[ch] To: Omar Polo Cc: gameoftrees@openbsd.org Date: Thu, 16 Nov 2023 22:56:59 +0100 On Thu, Nov 16, 2023 at 10:49:06PM +0100, Omar Polo wrote: > On 2023/11/16 22:03:16 +0100, Stefan Sperling wrote: > > On Wed, Nov 15, 2023 at 07:46:57PM +0100, Omar Polo wrote: > > > +#define IMSG_SIZE_CHECK(imsg, p) do { \ > > > + if (IMSG_DATA_SIZE(imsg) < sizeof(*p)) \ > > > > Could this check even be != sizeof(*p)? > > As far as I can see all messages used by gotwebd are of a fixed size. > > IIRC this define is used by other daemons as well and I'd like not to > change its behaviour here. > > Now, actually I'd prefer to remove completely its usage. I always get > confused about whether it takes a pointer or the variable directly, and > I've fixed at least a few wrong usage (one was fixed in the diff > itself.) Sure. I have no concerns about removing these macros. They were never needed in other code we have that processes such messages.