diff options
author | David Sterba <dsterba@suse.com> | 2015-09-25 17:59:43 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2015-10-02 17:54:26 +0200 |
commit | 5e561cef1d51e6fc6b52460f70b9bca5d4b3ed03 (patch) | |
tree | b1ab9f8d9376add2f0fc834435e2cde72ce653e1 /utils.c | |
parent | ece0e1ea036e6d1c952f304ff74762a12786c37f (diff) |
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>
Diffstat (limited to 'utils.c')
-rw-r--r-- | utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } /* |