[lkml]   [2020]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 09/12] samples: configfs: prefer sizeof(*var) to sizeof(struct var_type)
On Thu, Sep 24, 2020 at 02:45:23PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <>
> It's better to use the size of the actual variable than its type when
> allocating memory. This also has the benefit of avoiding a line break
> here.

Either style has up an downside. The variable based on tracks type
changes automatically, but on the other hand leads to lots of bugs
where people forget the *. I'd rather not just change from one to
the other pointlessly.

 \ /
  Last update: 2020-10-07 15:47    [W:0.077 / U:3.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site