summaryrefslogtreecommitdiff
path: root/src/pathchk.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/pathchk.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/pathchk.c')
-rw-r--r--src/pathchk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pathchk.c b/src/pathchk.c
index cf7b8eb67..a23b53c4c 100644
--- a/src/pathchk.c
+++ b/src/pathchk.c
@@ -270,7 +270,7 @@ validate_file_name (char *file, bool check_basic_portability,
if (check_extra_portability && ! no_leading_hyphen (file))
return false;
- if ((check_basic_portability | check_extra_portability)
+ if ((check_basic_portability || check_extra_portability)
&& filelen == 0)
{
/* Fail, since empty names are not portable. As of