dtc: pos parameter to srcpos_string() can't be NULL
None of the callers ever pass a NULL to srcpos_string(), so the check for it is not necessary. Furthermore, checking it make Coverity complain about the raw dereferences which follow later in the function. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
95d57726bc
commit
00d7bb1f4b
1 changed files with 1 additions and 1 deletions
2
srcpos.c
2
srcpos.c
|
@ -252,7 +252,7 @@ srcpos_string(struct srcpos *pos)
|
|||
const char *fname = "<no-file>";
|
||||
char *pos_str;
|
||||
|
||||
if (pos)
|
||||
if (pos->file && pos->file->name)
|
||||
fname = pos->file->name;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue