Re: [PATCH] watchdog: gpio-wdt: be more strict about hw_algo matching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/30/2015 02:32 AM, Uwe Kleine-König wrote:
strncmp(algo, "toggle", 6) doesn't compare the trailing '\0' byte, so
using

	hw_algo = "toggleboggle"

is recognized the same way as

	hw_algo = "toggle"

. While this doesn't introduce any problems for a device tree that
sticks to the documented settings it's still ugly.

Fix this by using strcmp to only match on "toggle" and "level".

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>

Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux