aboutsummaryrefslogtreecommitdiffstats
path: root/colorize.c
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org>2017-10-29 16:56:57 +0100
committerGravatar Steven Schubiger <stsc@refcnt.org>2017-10-29 16:56:57 +0100
commite5d940c200f43f3698b12ee40a2fa3ceb9707b8d (patch)
treef0e58d4288a685be0557916114bcd73a115592fc /colorize.c
parent1ab8fa04616470ffa28b803a5b1b747860d3b12f (diff)
downloadcolorize-e5d940c200f43f3698b12ee40a2fa3ceb9707b8d.tar.gz
colorize-e5d940c200f43f3698b12ee40a2fa3ceb9707b8d.tar.bz2
Simplify SKIP_LINE_ENDINGS() macro
Diffstat (limited to 'colorize.c')
-rw-r--r--colorize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/colorize.c b/colorize.c
index b9e5c49..49879c5 100644
--- a/colorize.c
+++ b/colorize.c
@@ -73,7 +73,7 @@
#define LF 0x01
#define CR 0x02
-#define SKIP_LINE_ENDINGS(flags) (((flags) & CR) && ((flags) & LF) ? 2 : 1)
+#define SKIP_LINE_ENDINGS(flags) ((flags) == (CR|LF) ? 2 : 1)
#define VALID_FILE_TYPE(mode) (S_ISREG (mode) || S_ISLNK (mode) || S_ISFIFO (mode))