misc: Make clang --analyze happy with the source code

The compiler concludes that if (ts->type == type && ts->line && line
can be false as line is NULL and then we unconditionally access
it, make it happy by adding an extra NULL check.
This commit is contained in:
Holger Hans Peter Freyther 2011-01-16 18:12:13 +01:00
parent 1761d02ddb
commit 91f587ed98
1 changed files with 1 additions and 1 deletions

View File

@ -302,7 +302,7 @@ int e1inp_ts_config(struct e1inp_ts *ts, struct e1inp_line *line,
switch (type) {
case E1INP_TS_TYPE_SIGN:
if (line->driver)
if (line && line->driver)
ts->sign.delay = line->driver->default_delay;
else
ts->sign.delay = 100000;