enumerator: Enumerate glob(3) matches using gl_pathc
authorMartin Willi <martin@revosec.ch>
Mon, 7 Jul 2014 13:27:19 +0000 (15:27 +0200)
committerMartin Willi <martin@revosec.ch>
Mon, 7 Jul 2014 14:14:17 +0000 (16:14 +0200)
commitc1490c649a94b09a66b154af781ff0aea20ffa44
tree089ad94ac740bc1312ff5a07203022bd32c6e21b
parent44870e531309de01bf1eb92976d5046ab6526fb0
enumerator: Enumerate glob(3) matches using gl_pathc

While glob should return a NULL terminated gl_pathv when having no matches,
at least on OS X this is not true when using GLOB_DOOFFS. Rely on the
number of matches returned in gl_pathc, which seems to be more reliable in
error cases.
src/libstrongswan/collections/enumerator.c