lkml.org 
[lkml]   [2020]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH net-next 01/11] atm: horizon: shut up clang null pointer arithmetic warning
    Date
    > -  for (mem = (HDW *) memmap; mem < (HDW *) (memmap + 1); ++mem)
    > + for (mem = (HDW *) memmap; mem < (HDW *) ((uintptr_t)memmap + 1); ++mem)

    Note that these two lines are semantically different. In the first line,
    "+ 1" moves the pointer by (sizeof memmap) bytes. However in the second
    line, "+ 1" moves the pointer by only 1 byte.

    This driver is old, but let's still keep its code correct!

    \
     
     \ /
      Last update: 2020-10-27 04:56    [W:4.027 / U:0.104 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site