Commit-ID: 3b44edaaa1fffccea7edc018dd807581c97a6aea Gitweb: http://git.kernel.org/tip/3b44edaaa1fffccea7edc018dd807581c97a6aea Author: Andrzej Hajda <a.hajda@xxxxxxxxxxx> AuthorDate: Mon, 21 Sep 2015 15:33:41 +0200 Committer: John Stultz <john.stultz@xxxxxxxxxx> CommitDate: Thu, 10 Dec 2015 22:41:05 -0800 selftests/timers: fix write return value handlng The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@xxxxxxxxxxx> Signed-off-by: John Stultz <john.stultz@xxxxxxxxxx> --- tools/testing/selftests/timers/clocksource-switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/timers/clocksource-switch.c b/tools/testing/selftests/timers/clocksource-switch.c index 627ec74..fd88e30 100644 --- a/tools/testing/selftests/timers/clocksource-switch.c +++ b/tools/testing/selftests/timers/clocksource-switch.c @@ -97,7 +97,7 @@ int get_cur_clocksource(char *buf, size_t size) int change_clocksource(char *clocksource) { int fd; - size_t size; + ssize_t size; fd = open("/sys/devices/system/clocksource/clocksource0/current_clocksource", O_WRONLY); -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |