smack-team/smack — pull request #73 by rafal-krypa (2013-12-04 16:02:14+00:00)
Title: utils: use common code for apply_rules and apply_cipso

Code for `apply_rules()` has been rewritten to use `opendir()` and `readdir()`, but `apply_cipso()` remained implemented with nftw(). This patch implements both applying functions with `opendir()` and `readdir()` using a common internal function `apply_dir()`.
The resulting code is 45 lines shorter and keeps directory traversal logic in single place.