[PATCH v2] top: fix and merge code to parse /proc/meminfo

Bartosz Gołaszewski bartekgola at gmail.com
Mon Jul 28 17:36:13 UTC 2014


2014-07-28 18:48 GMT+02:00 Timo Teras <timo.teras at iki.fi>:
>
> I was taking sizeof of individual element: meminfo[0]. Alternative
> would be sizeof *meminfo. I prefer not to expand to the actual type.
> It's easier to change if needed, and the correctness more obvious as
> you don't need to look what was type of meminfo - looking at the
> memset line alone is sufficient.
>

You're right, my bad. I misread it as meminfo[].

Best regards,
Bartosz Gołaszewski


More information about the busybox mailing list