From 1c70a1929310d1fbea660372adf06cd40c848410 Mon Sep 17 00:00:00 2001 From: Brandon Paupore Date: Tue, 31 Aug 2021 10:08:11 -0500 Subject: [PATCH] Use hex values instead of decimal for flag checking Signed-off-by: Brandon Paupore --- nvme.c | 2 +- plugins/wdc/wdc-nvme.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nvme.c b/nvme.c index a7d893f6..2c91362f 100644 --- a/nvme.c +++ b/nvme.c @@ -479,7 +479,7 @@ static int get_telemetry_log(int argc, char **argv, struct command *cmd, struct } else if (err < 0) { perror("get-feature"); } else { - if ((ctrl.lpa & 64)) { + if ((ctrl.lpa & 0x40)) { if (((unsigned char *)buf)[1] == 1) total_size = (le32_to_cpu(log->dalb4) * bs) + NVME_LOG_TELEM_BLOCK_SIZE; else { diff --git a/plugins/wdc/wdc-nvme.c b/plugins/wdc/wdc-nvme.c index 131b2c8f..5ec575af 100644 --- a/plugins/wdc/wdc-nvme.c +++ b/plugins/wdc/wdc-nvme.c @@ -2096,7 +2096,7 @@ static int wdc_do_cap_telemetry_log(int fd, char *file, __u32 bs, int type, int } else if (err < 0) { perror("get-feature"); } else { - if ((ctrl.lpa & 64)) { + if ((ctrl.lpa & 0x40)) { if (((unsigned char *)buf)[1] == 1) full_size = (le32_to_cpu(hdr->dalb4) * WDC_TELEMETRY_BLOCK_SIZE) + WDC_TELEMETRY_HEADER_LENGTH; else { -- 2.50.1