[LTP] [PATCH v3 02/10] Rewrite msg_comm.c using new LTP API

Cyril Hrubis chrubis@suse.cz
Thu Mar 24 15:39:36 CET 2022


Hi!
> -	if (msgsnd(id, &m, sizeof(struct sysv_msg) - sizeof(long), 0) == -1) {
                              ^
			      I think that sizeof(m.mtext) would be
			      cleaner

As due to a padding the actuall size of a structure may be bigger than
the sum of it's members...

Other than that the rest of the code looks good.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list