mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Fix some static analysis issues
This commit is contained in:
parent
fb54604b31
commit
f147d3dde9
30 changed files with 375 additions and 266 deletions
|
@ -69,7 +69,9 @@ int scandir(const char *path, struct dirent ***res,
|
|||
}
|
||||
errno = old_errno;
|
||||
|
||||
if (cmp) qsort(names, cnt, sizeof *names, (int (*)(const void *, const void *))cmp);
|
||||
if (cmp && names) {
|
||||
qsort(names, cnt, sizeof *names, (int (*)(const void *, const void *))cmp);
|
||||
}
|
||||
*res = names;
|
||||
return cnt;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue