From f738166b17bfa756aa0ab97cb5f3b0185f010fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=3D=3FUTF-8=3FB=3F6ZmI5p6X6aOe=3F=3D?= Date: Tue, 19 Jan 2016 06:57:34 -0600 Subject: [PATCH] examples/watchdog: Some fixes to help text and ping time range --- examples/watchdog/watchdog_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/watchdog/watchdog_main.c b/examples/watchdog/watchdog_main.c index 95ff07b83..aeff559dd 100644 --- a/examples/watchdog/watchdog_main.c +++ b/examples/watchdog/watchdog_main.c @@ -95,9 +95,9 @@ static void wdog_help(void) printf("timer. Ping for the watchdog for seconds, then let it expire.\n"); printf("\nOptions include:\n"); printf(" [-d ] = Selects the time in milliseconds. Default: %d\n", - CONFIG_EXAMPLES_WATCHDOG_PINGTIME); - printf(" [-p 99) + if (value < 1 || value > INT_MAX) { printf("Ping time out of range: %ld\n", value); exit(EXIT_FAILURE); } - wdog->pingtime = (uint8_t)value; + wdog->pingtime = (uint32_t)value; index += nargs; break;