vppinfra: Check for NULL vec before the backwards iteration 59/34859/2
authorNeale Ranns <neale@graphiant.com>
Sun, 9 Jan 2022 13:24:47 +0000 (13:24 +0000)
committerDamjan Marion <dmarion@me.com>
Sun, 9 Jan 2022 14:32:30 +0000 (14:32 +0000)
commit9d33cfc0bc1928f0b4c8aa95c170cf91ee8011a0
treeecf02868928c67abaa349c36fbe406f93dd47a83
parent221be7c03f8daf5b9c00b2509ebbf2c6e7e6232d
vppinfra: Check for NULL vec before the backwards iteration

Type: improvement

'vec_end(v) - 1' does not yield a good starting point. Check for NULL vec before the loop, so the user does not have to.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ia174ec8095bc476853cce709a7048d7a3e3b377d
src/vppinfra/vec_bootstrap.h