Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a5e10d4 authored by Eugeniu Rosca's avatar Eugeniu Rosca Committed by Shuah Khan
Browse files

selftests: watchdog: prefer strtoul() over atoi()



commit f15d7114 ("Documentation/watchdog: add timeout and ping rate
control to watchdog-test.c") used both atoi() and strtoul() for string
to integer conversion. As usage of atoi() is discouraged in newer code,
replace it with strtoul() for consistency.

Signed-off-by: default avatarEugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent 749fb263
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ int main(int argc, char *argv[])
			printf("Watchdog ping rate set to %u seconds.\n", ping_rate);
			break;
		case 't':
			flags = atoi(optarg);
			flags = strtoul(optarg, NULL, 0);
			ret = ioctl(fd, WDIOC_SETTIMEOUT, &flags);
			if (!ret)
				printf("Watchdog timeout set to %u seconds.\n", flags);