Fix inverted usage of endian conversion macros.

This is mostly a semantic issue since the end result would be the same.
edge.strict_endians
Erik Larsson 2016-01-04 10:08:15 +01:00
parent 9cf04fd2cd
commit 75da0ce302
2 changed files with 4 additions and 4 deletions

View File

@ -2540,7 +2540,7 @@ static int upgrade_to_large_index(MFT_RECORD *m, const char *name,
goto err_out;
}
/* Set VCN pointer to 0LL. */
*(leVCN*)((char*)re + cpu_to_le16(re->length) - sizeof(VCN)) =
*(leVCN*)((char*)re + le16_to_cpu(re->length) - sizeof(VCN)) =
const_cpu_to_sle64(0);
err = ntfs_mst_pre_write_fixup((NTFS_RECORD*)ia_val, index_block_size);
if (err) {

View File

@ -563,12 +563,12 @@ static void dump_attr_record(MFT_RECORD *m, ATTR_RECORD *a)
printf("Length of resident part = %u (0x%x)\n", u, u);
printf("Attribute is %sresident\n", a->non_resident ? "non-" : "");
printf("Name length = %u unicode characters\n", a->name_length);
printf("Name offset = %u (0x%x)\n", cpu_to_le16(a->name_offset),
cpu_to_le16(a->name_offset));
printf("Name offset = %u (0x%x)\n", le16_to_cpu(a->name_offset),
le16_to_cpu(a->name_offset));
u = a->flags;
if (a->name_length) {
if (ucstos(s, (ntfschar*)((char*)a +
cpu_to_le16(a->name_offset)),
le16_to_cpu(a->name_offset)),
min((int)sizeof(s),
a->name_length + 1)) == -1) {
ntfs_log_error("Could not convert Unicode string to single "