lkml.org 
[lkml]   [2011]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: make checkpatch warn about memset with swapped arguments.
    On Thu, Mar 17, 2011 at 05:38:16PM -0400, Steven Rostedt wrote:

    > > Maybe it's just me, but I think it would be better to use bzero() for
    > > this operation - it's more readable and it can't be screwed up. Then
    > > checkpatch checks for memset(xxx, 0, xxx) and for memset(xxx, xxx, 0)
    > > and says "hey, use bzero".
    >
    > Honestly, I've never had the issues with memset. Maybe back in college.
    > But heh, whatever.

    You're smarter than the average bear.

    Given how often this bug turns up in both userspace and kernelspace,
    it's a landmine waiting for someone to step on.

    Dave



    \
     
     \ /
      Last update: 2011-03-17 22:53    [W:0.023 / U:6.456 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site