summaryrefslogtreecommitdiff
path: root/e2fsprogs/blkid
diff options
context:
space:
mode:
authorDenis Vlasenko2006-12-21 13:23:14 +0000
committerDenis Vlasenko2006-12-21 13:23:14 +0000
commitbf66fbc8e2380717c1fab860cfc60c78582839dd (patch)
tree3ab3dd4df901851ff7f4345708592118766ba4aa /e2fsprogs/blkid
parent6910741067913d131d931b1e6424d3b8ed43e64f (diff)
downloadbusybox-bf66fbc8e2380717c1fab860cfc60c78582839dd.zip
busybox-bf66fbc8e2380717c1fab860cfc60c78582839dd.tar.gz
introduce LONE_CHAR (optimized strcmp with one-char string)
Diffstat (limited to 'e2fsprogs/blkid')
-rw-r--r--e2fsprogs/blkid/devname.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/e2fsprogs/blkid/devname.c b/e2fsprogs/blkid/devname.c
index d69000b..3d11734 100644
--- a/e2fsprogs/blkid/devname.c
+++ b/e2fsprogs/blkid/devname.c
@@ -189,7 +189,7 @@ static void lvm_probe_all(blkid_cache cache)
struct dirent *lv_iter;
vg_name = vg_iter->d_name;
- if (!strcmp(vg_name, ".") || !strcmp(vg_name, ".."))
+ if (LONE_CHAR(vg_name, '.') || !strcmp(vg_name, ".."))
continue;
vdirname = xmalloc(vg_len + strlen(vg_name) + 8);
sprintf(vdirname, "%s/%s/LVs", VG_DIR, vg_name);
@@ -203,7 +203,7 @@ static void lvm_probe_all(blkid_cache cache)
char *lv_name, *lvm_device;
lv_name = lv_iter->d_name;
- if (!strcmp(lv_name, ".") || !strcmp(lv_name, ".."))
+ if (LONE_CHAR(lv_name, '.') || !strcmp(lv_name, ".."))
continue;
lvm_device = xmalloc(vg_len + strlen(vg_name) +