btrfs-progs: make sure that is_block_device will return only 0/1

The macro return nonzero, we'll test against 0/1 (or < 0).

Signed-off-by: David Sterba <dsterba@suse.com>
master
David Sterba 2015-09-25 17:59:43 +02:00
parent ece0e1ea03
commit 5e561cef1d
1 changed files with 1 additions and 1 deletions

View File

@ -959,7 +959,7 @@ int is_block_device(const char *path)
if (stat(path, &statbuf) < 0)
return -errno;
return S_ISBLK(statbuf.st_mode);
return !!S_ISBLK(statbuf.st_mode);
}
/*