lkml.org 
[lkml]   [2015]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 1/4] gpio: use sizeof() instead of hardcoded values
From
On Wed, Jan 21, 2015 at 10:33 PM, Olliver Schinagl
<o.schinagl@ultimaker.com> wrote:

> From: Olliver Schinagl <oliver@schinagl.nl>
>
> gpiolib uses a fixed string for the suffixes and defines it at 32 bytes.
> Later in the code snprintf is used with this fixed value of 32. Using
> sizeof() is safer in case the size for the suffixes is ever changed.
>
> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>

OK looks nice.

Patch applied.

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2015-01-30 15:01    [W:0.171 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site