close_fds(): always use h->vzfd argument right before the last one
When not running on OpenVZ kernels, vzfd is not defined (will be -1).
This is okay for close_fds, because it will stop when it finds a
fd that equals to -1. However, if this is used in the middle of the
parameter list we will have problems.
This standardizes all callers of close_fds outside OpenVZ specific
files to always use it as the last valid parameter (before the
explicit -1).
This way we should be able to call this code from common code.
Signed-off-by: Glauber Costa <glommer@parallels.com>
2 files changed