From 73a6c78e7bec467ac73a70f00c03e72ab47665bb Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 15 Sep 2013 00:10:45 +0200 Subject: [PATCH] Remove unnecessary check in handle_*_pre(). init_pre_post_string() sets both pre_string and post_string, so checking only one suffices. --- src/coloredstderr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coloredstderr.c b/src/coloredstderr.c index 4664f0d..e6f1f6a 100644 --- a/src/coloredstderr.c +++ b/src/coloredstderr.c @@ -193,7 +193,7 @@ static void handle_fd_pre(int fd) { int saved_errno = errno; - if (unlikely(!pre_string || !post_string)) { + if (unlikely(!pre_string)) { init_pre_post_string(); } @@ -222,7 +222,7 @@ static void handle_file_pre(FILE *stream) { int saved_errno = errno; - if (unlikely(!pre_string || !post_string)) { + if (unlikely(!pre_string)) { init_pre_post_string(); } -- 2.43.2