aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/e1_input.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-01-16 18:12:13 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-01-16 20:31:59 +0100
commit91f587ed98e40bd138049102d78181aaa97f4ebd (patch)
treeab0a0b4f0c80ef3d186b7534435da22aa101f417 /openbsc/src/e1_input.c
parent1761d02ddb74a83ef9b783924e08f720e4ccdec7 (diff)
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.
Diffstat (limited to 'openbsc/src/e1_input.c')
-rw-r--r--openbsc/src/e1_input.c2
1 files changed, 1 insertions, 1 deletions
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;