[lkml]   [2011]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: make checkpatch warn about memset with swapped arguments.
Dave Jones <> writes:

> Because the second and third arguments of memset have the same type,
> it turns out to be really easy to mix them up.
> This bug comes up time after time, so checkpatch should really
> be checking for it at patch submission time.

Or we just readd an optimized bzero() and recommend people use that
instead of memset for zero? And then there won't be too many users left.

I always felt classic BSD was much more sensible regarding this than

It's better to avoid errors in the first place than to check for
them later.


-- -- Speaking for myself only

 \ /
  Last update: 2011-03-17 23:59    [W:0.057 / U:5.308 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site