The switch from %lli to %lld in virCgroupGetValueI64 is intended,
as virCgroupGetValueU64 uses base 10 too, and virCgroupSetValueI64
uses %lld to format the number to string.
Parsing is stricter now and doesn't accept trailing characters
after the actual value anymore.
#include <stdio.h>
#include <stdint.h>
-#include <inttypes.h>
#ifdef HAVE_MNTENT_H
# include <mntent.h>
#endif
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);