die() already adds the newline at the end of the string. Suggested-by: Alexandru Elisei <alexandru.elisei@xxxxxxx> Signed-off-by: Fuad Tabba <tabba@xxxxxxxxxx> --- util/util.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/util/util.c b/util/util.c index 1877105..786dfc5 100644 --- a/util/util.c +++ b/util/util.c @@ -90,14 +90,14 @@ void *mmap_hugetlbfs(struct kvm *kvm, const char *htlbfs_path, u64 size) unsigned long blk_size; if (statfs(htlbfs_path, &sfs) < 0) - die("Can't stat %s\n", htlbfs_path); + die("Can't stat %s", htlbfs_path); if ((unsigned int)sfs.f_type != HUGETLBFS_MAGIC) - die("%s is not hugetlbfs!\n", htlbfs_path); + die("%s is not hugetlbfs!", htlbfs_path); blk_size = (unsigned long)sfs.f_bsize; if (sfs.f_bsize == 0 || blk_size > size) { - die("Can't use hugetlbfs pagesize %ld for mem size %lld\n", + die("Can't use hugetlbfs pagesize %ld for mem size %lld", blk_size, (unsigned long long)size); } @@ -106,10 +106,10 @@ void *mmap_hugetlbfs(struct kvm *kvm, const char *htlbfs_path, u64 size) snprintf(mpath, PATH_MAX, "%s/kvmtoolXXXXXX", htlbfs_path); fd = mkstemp(mpath); if (fd < 0) - die("Can't open %s for hugetlbfs map\n", mpath); + die("Can't open %s for hugetlbfs map", mpath); unlink(mpath); if (ftruncate(fd, size) < 0) - die("Can't ftruncate for mem mapping size %lld\n", + die("Can't ftruncate for mem mapping size %lld", (unsigned long long)size); addr = mmap(NULL, size, PROT_RW, MAP_PRIVATE, fd, 0); close(fd); -- 2.39.0.rc0.267.gcb52ba06e7-goog