From: Simon Ruderich Date: Sat, 14 Sep 2013 22:10:45 +0000 (+0200) Subject: Remove unnecessary check in handle_*_pre(). X-Git-Tag: 0.1~2 X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=73a6c78e7bec467ac73a70f00c03e72ab47665bb;p=coloredstderr%2Fcoloredstderr.git Remove unnecessary check in handle_*_pre(). init_pre_post_string() sets both pre_string and post_string, so checking only one suffices. --- 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(); }