Thread (17 messages) 17 messages, 6 authors, 2015-03-04

Re: [PATCH v2 1/4] gpio: use sizeof() instead of hardcoded values

From: Linus Walleij <hidden>
Date: 2015-01-30 13:43:33
Also in: linux-devicetree, linux-gpio, linux-leds, lkml

On Wed, Jan 21, 2015 at 10:33 PM, Olliver Schinagl
[off-list ref] wrote:
From: Olliver Schinagl <redacted>

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 <redacted>
OK looks nice.

Patch applied.

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help