From 4c4466292e7b0c86e8052634477abf4ac6330df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Dejean?= Date: Mon, 29 Dec 2014 22:30:20 +0100 Subject: [PATCH] Fixed sscanf format string as arguments are unsigned ints. --- sysdeps/linux/open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/linux/open.c b/sysdeps/linux/open.c index bbbf0df2..d5e5c684 100644 --- a/sysdeps/linux/open.c +++ b/sysdeps/linux/open.c @@ -42,7 +42,7 @@ static void set_linux_version(glibtop *server) if (uname(&uts) == -1) /* failure most likely implies impending death */ glibtop_error_r(server, "uname() failed"); - version_string_depth = sscanf(uts.release, "%d.%d.%d", &x, &y, &z); + version_string_depth = sscanf(uts.release, "%u.%u.%u", &x, &y, &z); if ((version_string_depth < 2) || /* Non-standard for all known kernels */ ((version_string_depth < 3) && (x < 3))) /* Non-standard for 2.x.x kernels */