From 91f587ed98e40bd138049102d78181aaa97f4ebd Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 16 Jan 2011 18:12:13 +0100 Subject: 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. --- openbsc/src/e1_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsc') diff --git a/openbsc/src/e1_input.c b/openbsc/src/e1_input.c index 8dce1322a..a17ae415d 100644 --- a/openbsc/src/e1_input.c +++ b/openbsc/src/e1_input.c @@ -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; -- cgit v1.2.3