mirror of
https://github.com/troglobit/finit.git
synced 2026-10-16 10:39:35 +00:00
Silence false positive from Coverity Scan
51static int is_dir_empty(const char *path)
52{
1. var_decl: Declaring variable namelist without initializer.
53 struct dirent **namelist;
54 int num;
55
CID 898746: (#1 of 1): Uninitialized pointer read (UNINIT)
2. uninit_use_in_call: Using uninitialized value namelist when calling scandir.
56 num = scandir(path, &namelist, NULL, NULL);
57 if (num < 0)
58 return 0;
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -50,7 +50,7 @@ int r_flag = 0;
|
||||
|
||||
static int is_dir_empty(const char *path)
|
||||
{
|
||||
struct dirent **namelist;
|
||||
struct dirent **namelist = NULL;
|
||||
int num;
|
||||
|
||||
num = scandir(path, &namelist, NULL, NULL);
|
||||
|
||||
Reference in new issue
Block a user