Source-Changes-D archive

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

re: CVS commit: src/sys/arch/mac68k/mac68k



Christos Zoulas writes:
> In article <20190219003451.093B2FB17%cvs.NetBSD.org@localhost>,
> matthew green <source-changes-d%NetBSD.org@localhost> wrote:
> >-=-=-=-=-=-
> 
> >+	memcpy(intrnames, inames, MAX_INAME_LENGTH);
> 
> That should be:
> 	memcpy(intrnames, inames, sizeof(intrnames));

well.

maybe.  but it's not really any better.  intrnames is not
defined with MAX_INAME_LENGTH so using it in any place is
still a hack...

ie, the length is actually eintrnames-intrnames, but i am
not aware of a way to do that in pure C (leaving the names
as they are now, which they're needed for vmstat.  it needs
'eintrnames' to know the end of the list of strings.)

i'd like to replace it with a much less gross setup but i
didn't see one...

and the good thing is, gcc will whine if it grows ;)


.mrg.


Home | Main Index | Thread Index | Old Index