From 0be9580dd2dfdb7e523ed7a3aef3956bab09399d Mon Sep 17 00:00:00 2001 From: Thomas Jahns <jahns@dkrz.de> Date: Fri, 8 Apr 2016 14:28:39 +0000 Subject: [PATCH] Clarify assignments. --- src/stream_cdf.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/stream_cdf.c b/src/stream_cdf.c index 4931183d8..33efef74d 100644 --- a/src/stream_cdf.c +++ b/src/stream_cdf.c @@ -486,10 +486,7 @@ int xtypeIsText(int xtype) static int xtypeIsFloat(int xtype) { - int isFloat = FALSE; - - if ( xtype == NC_FLOAT || xtype == NC_DOUBLE ) isFloat = TRUE; - + int isFloat = xtype == NC_FLOAT || xtype == NC_DOUBLE; return isFloat; } @@ -710,8 +707,7 @@ void cdfDefTimeUnits(char *unitstr, taxis_t* taxis0, taxis_t* taxis) } else { - int timeunit = taxis->unit; - if ( timeunit == -1 ) timeunit = TUNIT_HOUR; + int timeunit = taxis->unit != -1 ? taxis->unit : TUNIT_HOUR; int rdate = taxis->rdate; int rtime = taxis->rtime; if ( rdate == -1 ) -- GitLab