Skip to contentSkip to conversation

ata_id: fix identify string fixup

PATCH New Andreas Schwab 1 participant 1 message Jan 30, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata_id: fix identify string fixup

---
 src/extras/ata_id/ata_id.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
src/extras/ata_id/ata_id.c +2 -2
index 924d479..c8ffe86 100644
@@ -307,8 +307,8 @@ static void disk_identify_get_string (uint8_t identify[512],
         assert ((dest_len & 1) = 0);
 
         while (dest_len > 0) {
-                c1 = ((uint16_t *) identify)[offset_words] >> 8;
-                c2 = ((uint16_t *) identify)[offset_words] & 0xff;
+                c1 = identify[offset_words * 2 + 1];
+                c2 = identify[offset_words * 2];
                 *dest = c1;
                 dest++;
                 *dest = c2;
Signature · 7 lines
1.7.9


-- 
Andreas Schwab, [email protected]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."