diff options
Diffstat (limited to 'src/udev/scsi_id')
-rw-r--r-- | src/udev/scsi_id/scsi_id.c | 13 | ||||
-rw-r--r-- | src/udev/scsi_id/scsi_serial.c | 6 |
2 files changed, 7 insertions, 12 deletions
diff --git a/src/udev/scsi_id/scsi_id.c b/src/udev/scsi_id/scsi_id.c index a1b8e75fac..3c4653fd19 100644 --- a/src/udev/scsi_id/scsi_id.c +++ b/src/udev/scsi_id/scsi_id.c @@ -279,9 +279,9 @@ static int get_file_options(struct udev *udev, strcpy(buffer, options_in); c = argc_count(buffer) + 2; *newargv = calloc(c, sizeof(**newargv)); - if (!*newargv) { + if (!*newargv) retval = log_oom(); - } else { + else { *argc = c; c = 0; /* @@ -537,16 +537,13 @@ static int scsi_id(struct udev *udev, char *maj_min_dev) if (dev_scsi.wwn_vendor_extension[0] != '\0') { printf("ID_WWN_VENDOR_EXTENSION=0x%s\n", dev_scsi.wwn_vendor_extension); printf("ID_WWN_WITH_EXTENSION=0x%s%s\n", dev_scsi.wwn, dev_scsi.wwn_vendor_extension); - } else { + } else printf("ID_WWN_WITH_EXTENSION=0x%s\n", dev_scsi.wwn); - } } - if (dev_scsi.tgpt_group[0] != '\0') { + if (dev_scsi.tgpt_group[0] != '\0') printf("ID_TARGET_PORT=%s\n", dev_scsi.tgpt_group); - } - if (dev_scsi.unit_serial_number[0] != '\0') { + if (dev_scsi.unit_serial_number[0] != '\0') printf("ID_SCSI_SERIAL=%s\n", dev_scsi.unit_serial_number); - } goto out; } diff --git a/src/udev/scsi_id/scsi_serial.c b/src/udev/scsi_id/scsi_serial.c index 69260cb1a0..de3b4f7581 100644 --- a/src/udev/scsi_id/scsi_serial.c +++ b/src/udev/scsi_id/scsi_serial.c @@ -135,9 +135,8 @@ static int sg_err_category_new(struct udev *udev, return SG_ERR_CAT_MEDIA_CHANGED; if (0x29 == asc) return SG_ERR_CAT_RESET; - } else if (sense_key == ILLEGAL_REQUEST) { + } else if (sense_key == ILLEGAL_REQUEST) return SG_ERR_CAT_NOTSUPPORTED; - } } return SG_ERR_CAT_SENSE; } @@ -490,9 +489,8 @@ static int check_fill_0x83_id(struct udev *udev, if ((page_83[1] & 0x30) == 0x10) { if (id_search->id_type != SCSI_ID_TGTGROUP) return 1; - } else if ((page_83[1] & 0x30) != 0) { + } else if ((page_83[1] & 0x30) != 0) return 1; - } if ((page_83[1] & 0x0f) != id_search->id_type) return 1; |