In efipart.c, the code to malloc the phys dev info (struct pdinfo) is allocated via:
malloc(nin * sizeof(*pdinfo));
It should be
malloc(nin * sizeof(struct pdinfo));
according to style(9) and in general code guidelines in FreeBSD
Differential D6233
209305 - Code to malloc should use struct <NAME> instead of pointer as per style guidelines sd_beastie.io on May 5 2016, 8:25 PM. Authored by Tags None Referenced Files
Subscribers
Details
Diff Detail
Event TimelineComment Actions Better to use variable to obtain size to allocate so that in the future if variable type changes, compiler's won't produce warnings and harder to track down. Comment Actions Even if style(9) says this, I vote "No Way Jose" and "Forget it" and "I'm likely to accidentally revert this when I merge my next changes." |