summaryrefslogtreecommitdiff
path: root/e2fsprogs/ext2fs/ismounted.c
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/ext2fs/ismounted.c
parent6910741067913d131d931b1e6424d3b8ed43e64f (diff)
downloadbusybox-bf66fbc8e2380717c1fab860cfc60c78582839dd.zip
busybox-bf66fbc8e2380717c1fab860cfc60c78582839dd.tar.gz
introduce LONE_CHAR (optimized strcmp with one-char string)
Diffstat (limited to 'e2fsprogs/ext2fs/ismounted.c')
-rw-r--r--e2fsprogs/ext2fs/ismounted.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/e2fsprogs/ext2fs/ismounted.c b/e2fsprogs/ext2fs/ismounted.c
index cace771..d943f11 100644
--- a/e2fsprogs/ext2fs/ismounted.c
+++ b/e2fsprogs/ext2fs/ismounted.c
@@ -144,7 +144,7 @@ static errcode_t check_mntent_file(const char *mtab_file, const char *file,
* read/write, since if the root is mounted read/only, the
* contents of /etc/mtab may not be accurate.
*/
- if (!strcmp(mnt->mnt_dir, "/")) {
+ if (LONE_CHAR(mnt->mnt_dir, '/')) {
is_root:
#define TEST_FILE "/.ismount-test-file"
*mount_flags |= EXT2_MF_ISROOT;