]> err.no Git - systemd/commitdiff
ata_id: fix identify string fixup
authorAndreas Schwab <schwab@linux-m68k.org>
Wed, 1 Feb 2012 11:50:48 +0000 (12:50 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 1 Feb 2012 11:58:27 +0000 (12:58 +0100)
src/extras/ata_id/ata_id.c

index 7c3be71a30147c69e6b7962ae5cd84b16afdd627..257f494496d675a70479b1e138e977728e78f5fc 100644 (file)
@@ -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;