diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-09-09 14:23:02 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-09-09 14:59:51 +0200 |
commit | 1f6b411372076426c0faf0bb350437fb4d82931f (patch) | |
tree | 32a52b3e2bb04731cc857b738e989531a4144516 /src/udev/scsi_id/scsi_id.c | |
parent | 94c156cd452424ea59931920df2454d9da7cb774 (diff) |
tree-wide: update empty-if coccinelle script to cover empty-while and more
Let's also clean up single-line while and for blocks.
Diffstat (limited to 'src/udev/scsi_id/scsi_id.c')
-rw-r--r-- | src/udev/scsi_id/scsi_id.c | 13 |
1 files changed, 5 insertions, 8 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; } |