Source-Changes-D archive

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

Re: CVS commit: src/external/cddl/osnet



On Apr 24,  1:43am, rmind%netbsd.org@localhost (Mindaugas Rasiukevicius) wrote:
-- Subject: Re: CVS commit: src/external/cddl/osnet

| christos%astron.com@localhost (Christos Zoulas) wrote:
| > >Modified Files:
| > >   src/external/cddl/osnet/dev/dtrace: dtrace_sysctl.c dtrace_unload.c
| > >   src/external/cddl/osnet/dev/dtrace/amd64: dtrace_subr.c
| > >   src/external/cddl/osnet/dev/dtrace/i386: dtrace_subr.c
| > >   src/external/cddl/osnet/dist/uts/common/dtrace: dtrace.c
| > >
| > >Log Message:
| > >Remove a couple of zero length kmem_frees.
| > >
| > >It should fix at least one crash when unloading the dtrace module,
| > >possibly many others.
| > 
| > please use sizeof(*var) instead of sizeof(type)
| > 
| 
| It is consistent with the code in OpenSolaris, so it should not diverge.

This is changed code that would produce a diff in either case.
It is more correct, and I don't see propagating a poor choice.
OpenSolaris uses NULL for 0 in many places, should we do the same
and turn off compiler warnings?

| Also, while I see the benefits with *var (technically, it is against KNF,
| by the way), my preference is to use type.

That was not an explicit preference, it was just a random choice, so I have
corrected it.

christos


Home | Main Index | Thread Index | Old Index