Respond to two static analysis issues in dirtree_path() reported by Ashwini Sharma.
authorRob Landley <rob@landley.net>
Mon, 22 Sep 2014 12:52:15 +0000 (07:52 -0500)
committerRob Landley <rob@landley.net>
Mon, 22 Sep 2014 12:52:15 +0000 (07:52 -0500)
commit29d30be31123129deac142c6208faa7a1a98b2d0
treebc4074bef093643c71b78910fd1e5410970e4192
parentc611c39db47324b9fa6e5cd0f602b3aa3f957ffe
Respond to two static analysis issues in dirtree_path() reported by Ashwini Sharma.

dirtree->name is an array, not a pointer, so can't be zero. Remove the test.

We dereference plen without checking it for null but calling dirtree_path(0, 0)
is pilot error: only the _first_ call can have plen = 0. Add a comment.
lib/dirtree.c