mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
0376c127f6
commit
086969277e
1665 changed files with 8479 additions and 8479 deletions
|
@ -51,7 +51,7 @@ void endspent()
|
|||
s_pwdp = {};
|
||||
}
|
||||
|
||||
struct spwd* getspnam(const char* name)
|
||||
struct spwd* getspnam(char const* name)
|
||||
{
|
||||
setspent();
|
||||
while (auto* sp = getspent()) {
|
||||
|
@ -62,7 +62,7 @@ struct spwd* getspnam(const char* name)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
static bool parse_shadow_entry(const String& line)
|
||||
static bool parse_shadow_entry(String const& line)
|
||||
{
|
||||
auto parts = line.split_view(':', true);
|
||||
if (parts.size() != 9) {
|
||||
|
@ -192,7 +192,7 @@ static void construct_spwd(struct spwd* sp, char* buf, struct spwd** result)
|
|||
sp->sp_pwdp = buf_pwdp;
|
||||
}
|
||||
|
||||
int getspnam_r(const char* name, struct spwd* sp, char* buf, size_t buflen, struct spwd** result)
|
||||
int getspnam_r(char const* name, struct spwd* sp, char* buf, size_t buflen, struct spwd** result)
|
||||
{
|
||||
// FIXME: This is a HACK!
|
||||
TemporaryChange name_change { s_name, {} };
|
||||
|
@ -212,7 +212,7 @@ int getspnam_r(const char* name, struct spwd* sp, char* buf, size_t buflen, stru
|
|||
return 0;
|
||||
}
|
||||
|
||||
const auto total_buffer_length = s_name.length() + s_pwdp.length() + 8;
|
||||
auto const total_buffer_length = s_name.length() + s_pwdp.length() + 8;
|
||||
if (buflen < total_buffer_length)
|
||||
return ERANGE;
|
||||
|
||||
|
@ -227,7 +227,7 @@ int putspent(struct spwd* p, FILE* stream)
|
|||
return -1;
|
||||
}
|
||||
|
||||
auto is_valid_field = [](const char* str) {
|
||||
auto is_valid_field = [](char const* str) {
|
||||
return str && !strpbrk(str, ":\n");
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue