Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
b938aa13
Commit
b938aa13
authored
Apr 07, 2016
by
Thomas Jahns
🤸
Browse files
Add else to mutually exclusive branches.
parent
2a1a89e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_cdf_time.c
View file @
b938aa13
...
...
@@ -89,9 +89,9 @@ void cdfDefTimeUnits(char *unitstr, taxis_t* taxis0, taxis_t* taxis)
if
(
timeunit
==
TUNIT_QUARTER
)
timeunit
=
TUNIT_MINUTE
;
else
if
(
timeunit
==
TUNIT_30MINUTES
)
timeunit
=
TUNIT_MINUTE
;
else
if
(
timeunit
==
TUNIT_3HOURS
||
timeunit
==
TUNIT_6HOURS
||
timeunit
==
TUNIT_12HOURS
)
timeunit
=
TUNIT_HOUR
;
else
if
(
timeunit
==
TUNIT_3HOURS
||
timeunit
==
TUNIT_6HOURS
||
timeunit
==
TUNIT_12HOURS
)
timeunit
=
TUNIT_HOUR
;
sprintf
(
unitstr
,
"%s since %d-%d-%d %02d:%02d:%02d"
,
tunitNamePtr
(
timeunit
),
year
,
month
,
day
,
hour
,
minute
,
second
);
...
...
@@ -105,12 +105,11 @@ void cdfDefForecastTimeUnits(char *unitstr, int timeunit)
unitstr
[
0
]
=
0
;
if
(
timeunit
==
-
1
)
timeunit
=
TUNIT_HOUR
;
if
(
timeunit
==
TUNIT_QUARTER
)
timeunit
=
TUNIT_MINUTE
;
if
(
timeunit
==
TUNIT_30MINUTES
)
timeunit
=
TUNIT_MINUTE
;
if
(
timeunit
==
TUNIT_3HOURS
||
timeunit
==
TUNIT_6HOURS
||
timeunit
==
TUNIT_12HOURS
)
timeunit
=
TUNIT_HOUR
;
else
if
(
timeunit
==
TUNIT_QUARTER
)
timeunit
=
TUNIT_MINUTE
;
else
if
(
timeunit
==
TUNIT_30MINUTES
)
timeunit
=
TUNIT_MINUTE
;
else
if
(
timeunit
==
TUNIT_3HOURS
||
timeunit
==
TUNIT_6HOURS
||
timeunit
==
TUNIT_12HOURS
)
timeunit
=
TUNIT_HOUR
;
strcpy
(
unitstr
,
tunitNamePtr
(
timeunit
));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment