summaryrefslogtreecommitdiff
path: root/src/df.c
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2009-09-23 10:10:51 +0100
committerPádraig Brady <P@draigBrady.com>2009-09-23 14:33:40 +0100
commita037e838e15c9a698f1634398e0fe2726398d575 (patch)
tree7361ac5f2c3dbd8fc4763e6fa960e6646670dc79 /src/df.c
parentade8dd2096e1898edefadf2314d4e1ec654adda5 (diff)
downloadcoreutils-a037e838e15c9a698f1634398e0fe2726398d575.tar.xz
maint: Use logical rather than bitwise operators on bools
This is because bitwise operators are: - confusing and inconsistent in a boolean context - non short circuiting - brittle in C89 where bool can be an int (so > 1)
Diffstat (limited to 'src/df.c')
-rw-r--r--src/df.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/df.c b/src/df.c
index fd59aea56..411e61a48 100644
--- a/src/df.c
+++ b/src/df.c
@@ -332,10 +332,10 @@ show_dev (char const *disk, char const *mount_point,
bool negate_used;
double pct = -1;
- if (me_remote & show_local_fs)
+ if (me_remote && show_local_fs)
return;
- if (me_dummy & !show_all_fs & !show_listed_fs)
+ if (me_dummy && !show_all_fs && !show_listed_fs)
return;
if (!selected_fstype (fstype) || excluded_fstype (fstype))
@@ -430,7 +430,7 @@ show_dev (char const *disk, char const *mount_point,
total = fsu.fsu_blocks;
available = fsu.fsu_bavail;
negate_available = (fsu.fsu_bavail_top_bit_set
- & known_value (available));
+ && known_value (available));
available_to_root = fsu.fsu_bfree;
if (known_value (total))