From 2d90461381202aea88f3fe19c03e6978f38ae4c9 Mon Sep 17 00:00:00 2001
From: Thomas Jahns <jahns@dkrz.de>
Date: Fri, 8 Apr 2016 14:28:34 +0000
Subject: [PATCH] Clarify assignment.

---
 src/stream_cdf.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/stream_cdf.c b/src/stream_cdf.c
index 46a86ad47..df382e8a4 100644
--- a/src/stream_cdf.c
+++ b/src/stream_cdf.c
@@ -166,14 +166,11 @@ int get_timeunit(size_t len, const char *ptu)
 static
 bool isTimeUnits(const char *timeunits)
 {
-  bool status = false;
-
-  if ( strncmp(timeunits, "sec",    3) == 0 ||
-       strncmp(timeunits, "minute", 6) == 0 ||
-       strncmp(timeunits, "hour",   4) == 0 ||
-       strncmp(timeunits, "day",    3) == 0 ||
-       strncmp(timeunits, "month",  5) == 0 ) status = true;
-
+  bool status = strncmp(timeunits, "sec",    3) == 0
+    || strncmp(timeunits, "minute", 6) == 0
+    || strncmp(timeunits, "hour",   4) == 0
+    || strncmp(timeunits, "day",    3) == 0
+    || strncmp(timeunits, "month",  5) == 0;
   return status;
 }
 
-- 
GitLab