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 <[email protected]>

Reviewed-by: Guenter Roeck <[email protected]>

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

Reply via email to