chiark / gitweb /
bootchart: Remove unneeded check for NULL
authorStefan Beller <stefanbeller@googlemail.com>
Sun, 29 Dec 2013 23:09:56 +0000 (00:09 +0100)
committerKay Sievers <kay@vrfy.org>
Mon, 30 Dec 2013 18:10:22 +0000 (19:10 +0100)
commit226b735a745c1e9bbab24b47460d7304def9d38f
tree7cc3e19eff70cf7e32883208b6270fdbfef917ef
parent818156512411835a4a7f070e6fec3d7b80e1f629
bootchart: Remove unneeded check for NULL

Directly before the changed line there is:

while ((parent->next_ps && parent->pid != ps->ppid))
parent = parent->next_ps;

which looks one element ahead of the list, hence we can rely on parent
being non null here.
If 'parent' were NULL at that while loop already, it would crash as we're
dereferencing 'parent' when checking for next_ps already.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
src/bootchart/store.c