summaryrefslogtreecommitdiff
path: root/src/udev/scsi_id/scsi_id.c
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2013-02-13 18:13:22 +0100
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2013-02-13 18:14:20 +0100
commit090be8653471e1abe3f1cdd32eaad0fbd65f85cd (patch)
tree760849764326e78d458ff7019ac8b3f2d88245d8 /src/udev/scsi_id/scsi_id.c
parentb05105f0a80bcf2f2d18e9e33f740d7d04fca633 (diff)
use streq instead of strcmp
Diffstat (limited to 'src/udev/scsi_id/scsi_id.c')
-rw-r--r--src/udev/scsi_id/scsi_id.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/udev/scsi_id/scsi_id.c b/src/udev/scsi_id/scsi_id.c
index dcf03eefac..ab7c54c3f2 100644
--- a/src/udev/scsi_id/scsi_id.c
+++ b/src/udev/scsi_id/scsi_id.c
@@ -372,11 +372,11 @@ static int set_options(struct udev *udev,
exit(0);
case 'p':
- if (strcmp(optarg, "0x80") == 0) {
+ if (streq(optarg, "0x80")) {
default_page_code = PAGE_80;
- } else if (strcmp(optarg, "0x83") == 0) {
+ } else if (streq(optarg, "0x83")) {
default_page_code = PAGE_83;
- } else if (strcmp(optarg, "pre-spc3-83") == 0) {
+ } else if (streq(optarg, "pre-spc3-83")) {
default_page_code = PAGE_83_PRE_SPC3;
} else {
log_error("Unknown page code '%s'\n", optarg);
@@ -449,11 +449,11 @@ static int per_dev_options(struct udev *udev,
break;
case 'p':
- if (strcmp(optarg, "0x80") == 0) {
+ if (streq(optarg, "0x80")) {
*page_code = PAGE_80;
- } else if (strcmp(optarg, "0x83") == 0) {
+ } else if (streq(optarg, "0x83")) {
*page_code = PAGE_83;
- } else if (strcmp(optarg, "pre-spc3-83") == 0) {
+ } else if (streq(optarg, "pre-spc3-83")) {
*page_code = PAGE_83_PRE_SPC3;
} else {
log_error("Unknown page code '%s'\n", optarg);