in_initrd: fix gcc compiler error

On some systems, this code caused a "comparison between signed
and unsigned" error.

Signed-off-by: Martin Wilck <mwilck@arcor.de>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
mwilck@arcor.de 2013-08-16 20:21:59 +02:00 committed by NeilBrown
parent 5684fff6f8
commit 7ac5d47e8a
1 changed files with 2 additions and 2 deletions

4
util.c
View File

@ -1949,6 +1949,6 @@ int in_initrd(void)
/* This is based on similar function in systemd. */
struct statfs s;
return statfs("/", &s) >= 0 &&
(s.f_type == TMPFS_MAGIC ||
s.f_type == RAMFS_MAGIC);
((unsigned long)s.f_type == TMPFS_MAGIC ||
(unsigned long)s.f_type == RAMFS_MAGIC);
}