mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:07:34 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
0376c127f6
commit
086969277e
1665 changed files with 8479 additions and 8479 deletions
|
@ -22,7 +22,7 @@
|
|||
extern "C" {
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/opendir.html
|
||||
DIR* opendir(const char* name)
|
||||
DIR* opendir(char const* name)
|
||||
{
|
||||
int fd = open(name, O_RDONLY | O_DIRECTORY);
|
||||
if (fd == -1)
|
||||
|
@ -229,7 +229,7 @@ int alphasort(const struct dirent** d1, const struct dirent** d2)
|
|||
}
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/scandir.html
|
||||
int scandir(const char* dir_name,
|
||||
int scandir(char const* dir_name,
|
||||
struct dirent*** namelist,
|
||||
int (*select)(const struct dirent*),
|
||||
int (*compare)(const struct dirent**, const struct dirent**))
|
||||
|
@ -273,10 +273,10 @@ int scandir(const char* dir_name,
|
|||
|
||||
// Sort the entries if the user provided a comparator.
|
||||
if (compare) {
|
||||
qsort(tmp_names.data(), tmp_names.size(), sizeof(struct dirent*), (int (*)(const void*, const void*))compare);
|
||||
qsort(tmp_names.data(), tmp_names.size(), sizeof(struct dirent*), (int (*)(void const*, void const*))compare);
|
||||
}
|
||||
|
||||
const int size = tmp_names.size();
|
||||
int const size = tmp_names.size();
|
||||
auto** names = static_cast<struct dirent**>(kmalloc_array(size, sizeof(struct dirent*)));
|
||||
if (names == nullptr) {
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue