From 007ff40bf440d72d2ca4ffed26b6b2ea752b1562 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 16 Nov 2022 10:29:19 +0100 Subject: filemap xattr: use file istream from libio instead of stdio FILE The line-by-line reading function in the io library was specifically added for this kind of use case, so we don't have to handle trimming of lines, don't have to touch getline() and it's convoluted error handling (return value -1 could mean either EOF or error). The code that searches for '\n' and replaces it with '\0' can be removed as well and a memory leak involving "line" is removed along the way. Signed-off-by: David Oberhollenzer --- bin/gensquashfs/mkfs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'bin/gensquashfs/mkfs.h') diff --git a/bin/gensquashfs/mkfs.h b/bin/gensquashfs/mkfs.h index bbecdbb..960a31c 100644 --- a/bin/gensquashfs/mkfs.h +++ b/bin/gensquashfs/mkfs.h @@ -13,6 +13,7 @@ #include "common.h" #include "fstree.h" #include "util/util.h" +#include "io/file.h" #ifdef HAVE_SYS_XATTR_H #include -- cgit v1.2.3