From 7627b5848a55957f7a6617e9d239bd245c34a679 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sat, 6 Oct 2012 15:45:37 +0200 Subject: [PATCH] Fix incorrect use of variable arguments in run_parts() and simplify code The run_parts() implementation used variable arguments in a bad way, resulting in it not working properly. Replaced va_*() code with a simple cmd argument that's passed to each script called. Also, the opendir()/readdir() code has been replaced with scandir() using regular alphasort(). This simplifies the code somewhat as well. Otherwise, minor cleanups. Signed-off-by: Joachim Nilsson --- fmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fmode.c b/fmode.c index 7b3e68f..6f27ecb 100644 --- a/fmode.c +++ b/fmode.c @@ -39,7 +39,7 @@ mode_t fmode(char *file) if (!file) { errno = EINVAL; - return 0; /* Doesn't exist ... */ + return 0; } if (!stat(file, &sb))