Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: CVS commit: src/sys/compat/sys



"Robert Elz" writes:
> Module Name:	src
> Committed By:	kre
> Date:		Fri Jun 15 07:46:59 UTC 2018
> 
> Modified Files:
> 	src/sys/compat/sys: time_types.h
> 
> Log Message:
> If we are going to use offsetof() we'd need to include <stddef.h> to
> get it defined.  Rather than deal with potential namespace issues
> with that, just clear the entire struct, rather than attempting to
> stop after the potential padding field.   If the compiler is good enough
> it should make no difference (there are just 3 fields, 2 named ones
> are assigned to, immediately after the memset() - the compiler can
> detect that, and not bother assigning (via memset()) to the unmamed
> 3rd padding field).   If the compiler is not smart enough to deal
> with this, then I doubt writing 8 more zero bytes will make enough
> difference to matter.

the compiler isn't smart apparently, and the previous change
should have fixed the problem.  did we really need this too?


.mrg.


Home | Main Index | Thread Index | Old Index