summaryrefslogtreecommitdiff
path: root/src/udev/ata_id/ata_id.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2017-10-10 00:22:57 +0200
committerMichael Biebl <biebl@debian.org>2017-10-10 00:22:57 +0200
commitf5e65279187b6aa0c0c5a00b14dca9eab441ffb2 (patch)
treeb834735b2b8fabf24499bb8cc12d4f24870436f7 /src/udev/ata_id/ata_id.c
parent81c583552ee1c3355cdef1b11a33737dd98e6971 (diff)
downloadsystemd-f5e65279187b6aa0c0c5a00b14dca9eab441ffb2.tar.gz
New upstream version 235
Diffstat (limited to 'src/udev/ata_id/ata_id.c')
-rw-r--r--src/udev/ata_id/ata_id.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/udev/ata_id/ata_id.c b/src/udev/ata_id/ata_id.c
index ad152b9d31..1dc62b69d5 100644
--- a/src/udev/ata_id/ata_id.c
+++ b/src/udev/ata_id/ata_id.c
@@ -617,7 +617,7 @@ int main(int argc, char *argv[])
*/
word = identify.wyde[76];
- if (word != 0x0000 && word != 0xffff) {
+ if (!IN_SET(word, 0x0000, 0xffff)) {
printf("ID_ATA_SATA=1\n");
/*
* If bit 2 of word 76 is set to one, then the device supports the Gen2
@@ -661,8 +661,7 @@ int main(int argc, char *argv[])
}
/* from Linux's include/linux/ata.h */
- if (identify.wyde[0] == 0x848a ||
- identify.wyde[0] == 0x844a ||
+ if (IN_SET(identify.wyde[0], 0x848a, 0x844a) ||
(identify.wyde[83] & 0xc004) == 0x4004)
printf("ID_ATA_CFA=1\n");
} else {