From 45141516d7f9512e1a340ff466b35a9d66da4df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Mon, 19 Jul 2021 09:23:23 +0200 Subject: [PATCH] Renamed ntfs_attr_consistent() as ntfs_attr_inconsistent() The original name was error prone while checking the condition. --- include/ntfs-3g/attrib.h | 2 +- libntfs-3g/attrib.c | 2 +- libntfs-3g/mft.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/ntfs-3g/attrib.h b/include/ntfs-3g/attrib.h index e2cf41b3..f2a180c9 100644 --- a/include/ntfs-3g/attrib.h +++ b/include/ntfs-3g/attrib.h @@ -398,7 +398,7 @@ extern int ntfs_attr_data_write(ntfs_inode *ni, const char *buf, size_t size, off_t offset); extern int ntfs_attr_shrink_size(ntfs_inode *ni, ntfschar *stream_name, int stream_name_len, off_t offset); -extern int ntfs_attr_consistent(const ATTR_RECORD *a, const MFT_REF mref); +extern int ntfs_attr_inconsistent(const ATTR_RECORD *a, const MFT_REF mref); #endif /* defined _NTFS_ATTRIB_H */ diff --git a/libntfs-3g/attrib.c b/libntfs-3g/attrib.c index b831c2bb..420fb493 100644 --- a/libntfs-3g/attrib.c +++ b/libntfs-3g/attrib.c @@ -3402,7 +3402,7 @@ not_found: * -1 with errno = EIO otherwise */ -int ntfs_attr_consistent(const ATTR_RECORD *a, const MFT_REF mref) +int ntfs_attr_inconsistent(const ATTR_RECORD *a, const MFT_REF mref) { const FILE_NAME_ATTR *fn; const INDEX_ROOT *ir; diff --git a/libntfs-3g/mft.c b/libntfs-3g/mft.c index cc244871..d0a601ff 100644 --- a/libntfs-3g/mft.c +++ b/libntfs-3g/mft.c @@ -286,7 +286,7 @@ int ntfs_mft_record_check(const ntfs_volume *vol, const MFT_REF mref, && (le32_to_cpu(a->type) >= le32_to_cpu(previous_type))) { if ((le32_to_cpu(a->length) <= (u32)space) && !(le32_to_cpu(a->length) & 7)) { - if (!ntfs_attr_consistent(a, mref)) { + if (!ntfs_attr_inconsistent(a, mref)) { previous_type = a->type; offset += le32_to_cpu(a->length); space -= le32_to_cpu(a->length);