]> git.ipfire.org Git - thirdparty/systemd.git/commit
strv: fix STRV_FOREACH_BACKWARDS() to be a single statement only
authorLennart Poettering <lennart@poettering.net>
Fri, 26 Aug 2016 17:18:15 +0000 (19:18 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 7 Oct 2016 18:14:38 +0000 (20:14 +0200)
commit4a39c774196f1a694477432f845e8bd62efee245
tree7ebdfbdab40660fcf8087b967eaa5d6598d85584
parentf767d3de652ec18c84ff0b99b1c4430269501e51
strv: fix STRV_FOREACH_BACKWARDS() to be a single statement only

Let's make sure people invoking STRV_FOREACH_BACKWARDS() as a single statement
of an if statement don't fall into a trap, and find the tail for the list via
strv_length().
src/basic/strv.h
src/test/test-strv.c