Commit 3e3ce7de authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Simplify setForecastTime.

parent 1fd0d1a3
......@@ -183,17 +183,11 @@ int scanTimeUnit(const char *unitstr)
static
void setForecastTime(const char *timestr, taxis_t *taxis)
{
(*taxis).fdate = 0;
(*taxis).ftime = 0;
int len = (int) strlen(timestr);
if ( len == 0 ) return;
int fdate = 0, ftime = 0;
scanTimeString(timestr, &fdate, &ftime);
(*taxis).fdate = fdate;
(*taxis).ftime = ftime;
size_t len = strlen(timestr);
if ( len != 0 )
scanTimeString(timestr, &taxis->fdate, &taxis->ftime);
else
taxis->fdate = taxis->ftime = 0;
}
static
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment