diff --git a/src/util/cgroup.c b/src/util/cgroup.c index 496d9d308b..4cb09b6d74 100644 --- a/src/util/cgroup.c +++ b/src/util/cgroup.c @@ -12,7 +12,6 @@ #include #include -#include #ifdef HAVE_MNTENT_H # include #endif @@ -374,7 +373,7 @@ static int virCgroupGetValueI64(virCgroupPtr group, if (rc != 0) goto out; - if (sscanf(strval, "%" SCNi64, value) != 1) + if (virStrToLong_ll(strval, NULL, 10, value) < 0) rc = -EINVAL; out: VIR_FREE(strval);