From bf66fbc8e2380717c1fab860cfc60c78582839dd Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 21 Dec 2006 13:23:14 +0000 Subject: introduce LONE_CHAR (optimized strcmp with one-char string) --- e2fsprogs/ext2fs/ismounted.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'e2fsprogs/ext2fs/ismounted.c') diff --git a/e2fsprogs/ext2fs/ismounted.c b/e2fsprogs/ext2fs/ismounted.c index cace7715c..d943f1185 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; -- cgit v1.2.3