From 77ad97f199f1bf05e9a7609bbdd239dab825b258 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 13 May 2008 02:27:31 +0000 Subject: more -Wall warning fixes from Cristian Ionescu-Idbohrn. This time it resulted in small code changes: function old new delta nexpr 820 828 +8 tail_main 1200 1202 +2 wrapf 166 167 +1 parse_mount_options 227 209 -18 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 11/-18) Total: -7 bytes --- util-linux/switch_root.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'util-linux/switch_root.c') diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c index c030b99e1..bae695b0b 100644 --- a/util-linux/switch_root.c +++ b/util-linux/switch_root.c @@ -13,15 +13,15 @@ // Make up for header deficiencies. #ifndef RAMFS_MAGIC -#define RAMFS_MAGIC 0x858458f6 +#define RAMFS_MAGIC ((unsigned)0x858458f6) #endif #ifndef TMPFS_MAGIC -#define TMPFS_MAGIC 0x01021994 +#define TMPFS_MAGIC ((unsigned)0x01021994) #endif #ifndef MS_MOVE -#define MS_MOVE 8192 +#define MS_MOVE 8192 #endif static dev_t rootdev; @@ -91,10 +91,10 @@ int switch_root_main(int argc ATTRIBUTE_UNUSED, char **argv) // we mean it. (I could make this a CONFIG option, but I would get email // from all the people who WILL eat their filesystems.) - if (lstat("/init", &st1) || !S_ISREG(st1.st_mode) || statfs("/", &stfs) || - (stfs.f_type != RAMFS_MAGIC && stfs.f_type != TMPFS_MAGIC) || - getpid() != 1) - { + if (lstat("/init", &st1) || !S_ISREG(st1.st_mode) || statfs("/", &stfs) + || (((unsigned)stfs.f_type != RAMFS_MAGIC) && ((unsigned)stfs.f_type != TMPFS_MAGIC)) + || (getpid() != 1) + ) { bb_error_msg_and_die("not rootfs"); } -- cgit v1.2.3