mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
Everywhere: Remove empty line after function body opening curly brace
This commit is contained in:
parent
2d6be48c6f
commit
dbe72fd962
25 changed files with 0 additions and 27 deletions
|
@ -167,7 +167,6 @@ TEST_CASE(pointers)
|
||||||
// This is a bit scary, thus this test. At least this test should fail in this case.
|
// This is a bit scary, thus this test. At least this test should fail in this case.
|
||||||
TEST_CASE(ensure_that_format_works)
|
TEST_CASE(ensure_that_format_works)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (String::formatted("FAIL") != "FAIL") {
|
if (String::formatted("FAIL") != "FAIL") {
|
||||||
fprintf(stderr, "FAIL\n");
|
fprintf(stderr, "FAIL\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
@ -103,7 +103,6 @@ enum class IDTEntryType {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
struct [[gnu::packed]] IDTEntry
|
struct [[gnu::packed]] IDTEntry
|
||||||
{
|
{
|
||||||
|
|
||||||
u16 offset_1; // offset bits 0..15
|
u16 offset_1; // offset bits 0..15
|
||||||
u16 selector; // a code segment selector in GDT or LDT
|
u16 selector; // a code segment selector in GDT or LDT
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,6 @@ inline void vmware_out(VMWareCommand& command)
|
||||||
|
|
||||||
inline void vmware_high_bandwidth_send(VMWareCommand& command)
|
inline void vmware_high_bandwidth_send(VMWareCommand& command)
|
||||||
{
|
{
|
||||||
|
|
||||||
command.magic = VMWARE_MAGIC;
|
command.magic = VMWARE_MAGIC;
|
||||||
command.port = VMWARE_PORT_HIGHBANDWIDTH;
|
command.port = VMWARE_PORT_HIGHBANDWIDTH;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ DiskPartitionMetadata::DiskPartitionMetadata(u64 start_block, u64 end_block, u8
|
||||||
, m_end_block(end_block)
|
, m_end_block(end_block)
|
||||||
, m_type(partition_type)
|
, m_type(partition_type)
|
||||||
{
|
{
|
||||||
|
|
||||||
VERIFY(m_type.is_valid());
|
VERIFY(m_type.is_valid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +50,6 @@ DiskPartitionMetadata::DiskPartitionMetadata(u64 start_block, u64 end_block, Arr
|
||||||
, m_end_block(end_block)
|
, m_end_block(end_block)
|
||||||
, m_type(partition_type)
|
, m_type(partition_type)
|
||||||
{
|
{
|
||||||
|
|
||||||
VERIFY(m_type.is_valid());
|
VERIFY(m_type.is_valid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -717,7 +717,6 @@ static KResultOr<Vector<String>> find_shebang_interpreter_for_executable(const c
|
||||||
|
|
||||||
KResultOr<RefPtr<FileDescription>> Process::find_elf_interpreter_for_executable(const String& path, const Elf32_Ehdr& main_program_header, int nread, size_t file_size)
|
KResultOr<RefPtr<FileDescription>> Process::find_elf_interpreter_for_executable(const String& path, const Elf32_Ehdr& main_program_header, int nread, size_t file_size)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Not using KResultOr here because we'll want to do the same thing in userspace in the RTLD
|
// Not using KResultOr here because we'll want to do the same thing in userspace in the RTLD
|
||||||
String interpreter_path;
|
String interpreter_path;
|
||||||
if (!ELF::validate_program_headers(main_program_header, file_size, (const u8*)&main_program_header, nread, &interpreter_path)) {
|
if (!ELF::validate_program_headers(main_program_header, file_size, (const u8*)&main_program_header, nread, &interpreter_path)) {
|
||||||
|
|
|
@ -89,7 +89,6 @@ void __ubsan_handle_sub_overflow(const OverflowData& data, ValueHandle, ValueHan
|
||||||
void __ubsan_handle_negate_overflow(const OverflowData&, ValueHandle);
|
void __ubsan_handle_negate_overflow(const OverflowData&, ValueHandle);
|
||||||
void __ubsan_handle_negate_overflow(const OverflowData& data, ValueHandle)
|
void __ubsan_handle_negate_overflow(const OverflowData& data, ValueHandle)
|
||||||
{
|
{
|
||||||
|
|
||||||
dbgln("KUBSAN: negation overflow, {} ({}-bit)", data.type.name(), data.type.bit_width());
|
dbgln("KUBSAN: negation overflow, {} ({}-bit)", data.type.name(), data.type.bit_width());
|
||||||
|
|
||||||
print_location(data.location);
|
print_location(data.location);
|
||||||
|
|
|
@ -18,7 +18,6 @@ M3UParser::M3UParser()
|
||||||
|
|
||||||
NonnullOwnPtr<M3UParser> M3UParser::from_file(const String path)
|
NonnullOwnPtr<M3UParser> M3UParser::from_file(const String path)
|
||||||
{
|
{
|
||||||
|
|
||||||
auto parser = make<M3UParser>();
|
auto parser = make<M3UParser>();
|
||||||
VERIFY(!path.is_null() && !path.is_empty() && !path.is_whitespace());
|
VERIFY(!path.is_null() && !path.is_empty() && !path.is_whitespace());
|
||||||
parser->m_use_utf8 = path.ends_with(".m3u8", AK::CaseSensitivity::CaseInsensitive);
|
parser->m_use_utf8 = path.ends_with(".m3u8", AK::CaseSensitivity::CaseInsensitive);
|
||||||
|
|
|
@ -47,7 +47,6 @@ private:
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (pledge("stdio recvfd sendfd thread rpath accept cpath wpath unix fattr", nullptr) < 0) {
|
if (pledge("stdio recvfd sendfd thread rpath accept cpath wpath unix fattr", nullptr) < 0) {
|
||||||
perror("pledge");
|
perror("pledge");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -376,7 +376,6 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_new_directory_action()
|
||||||
|
|
||||||
NonnullRefPtr<GUI::Action> HackStudioWidget::create_open_selected_action()
|
NonnullRefPtr<GUI::Action> HackStudioWidget::create_open_selected_action()
|
||||||
{
|
{
|
||||||
|
|
||||||
auto open_selected_action = GUI::Action::create("Open", [this](const GUI::Action&) {
|
auto open_selected_action = GUI::Action::create("Open", [this](const GUI::Action&) {
|
||||||
auto files = selected_file_paths();
|
auto files = selected_file_paths();
|
||||||
for (auto& file : files)
|
for (auto& file : files)
|
||||||
|
@ -678,7 +677,6 @@ String HackStudioWidget::get_full_path_of_serenity_source(const String& file)
|
||||||
|
|
||||||
RefPtr<EditorWrapper> HackStudioWidget::get_editor_of_file(const String& file_name)
|
RefPtr<EditorWrapper> HackStudioWidget::get_editor_of_file(const String& file_name)
|
||||||
{
|
{
|
||||||
|
|
||||||
String file_path = file_name;
|
String file_path = file_name;
|
||||||
|
|
||||||
// TODO: We can probably do a more specific condition here, something like
|
// TODO: We can probably do a more specific condition here, something like
|
||||||
|
|
|
@ -300,7 +300,6 @@ NonnullRefPtrVector<Declaration> ParserAutoComplete::get_global_declarations(con
|
||||||
|
|
||||||
String ParserAutoComplete::document_path_from_include_path(const StringView& include_path) const
|
String ParserAutoComplete::document_path_from_include_path(const StringView& include_path) const
|
||||||
{
|
{
|
||||||
|
|
||||||
static Regex<PosixExtended> library_include("<(.+)>");
|
static Regex<PosixExtended> library_include("<(.+)>");
|
||||||
static Regex<PosixExtended> user_defined_include("\"(.+)\"");
|
static Regex<PosixExtended> user_defined_include("\"(.+)\"");
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,6 @@ static String gethostbyaddr_name_buffer;
|
||||||
|
|
||||||
hostent* gethostbyaddr(const void* addr, socklen_t addr_size, int type)
|
hostent* gethostbyaddr(const void* addr, socklen_t addr_size, int type)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (type != AF_INET) {
|
if (type != AF_INET) {
|
||||||
errno = EAFNOSUPPORT;
|
errno = EAFNOSUPPORT;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
|
@ -12,7 +12,6 @@ extern "C" {
|
||||||
|
|
||||||
int ptrace(int request, pid_t tid, void* addr, int data)
|
int ptrace(int request, pid_t tid, void* addr, int data)
|
||||||
{
|
{
|
||||||
|
|
||||||
// PT_PEEK needs special handling since the syscall wrapper
|
// PT_PEEK needs special handling since the syscall wrapper
|
||||||
// returns the peeked value as an int, which can be negative because of the cast.
|
// returns the peeked value as an int, which can be negative because of the cast.
|
||||||
// When using PT_PEEK, the user can check if an error occurred
|
// When using PT_PEEK, the user can check if an error occurred
|
||||||
|
|
|
@ -84,7 +84,6 @@ void DateTime::set_time(unsigned year, unsigned month, unsigned day, unsigned ho
|
||||||
|
|
||||||
String DateTime::to_string(const String& format) const
|
String DateTime::to_string(const String& format) const
|
||||||
{
|
{
|
||||||
|
|
||||||
const char wday_short_names[7][4] = {
|
const char wday_short_names[7][4] = {
|
||||||
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
|
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
|
||||||
};
|
};
|
||||||
|
|
|
@ -325,7 +325,6 @@ Result<void, File::CopyError> File::copy_file_or_directory(const String& dst_pat
|
||||||
|
|
||||||
Result<void, File::CopyError> File::copy_file(const String& dst_path, const struct stat& src_stat, File& source)
|
Result<void, File::CopyError> File::copy_file(const String& dst_path, const struct stat& src_stat, File& source)
|
||||||
{
|
{
|
||||||
|
|
||||||
int dst_fd = creat(dst_path.characters(), 0666);
|
int dst_fd = creat(dst_path.characters(), 0666);
|
||||||
if (dst_fd < 0) {
|
if (dst_fd < 0) {
|
||||||
if (errno != EISDIR)
|
if (errno != EISDIR)
|
||||||
|
|
|
@ -31,7 +31,6 @@ LocalSocket::LocalSocket(int fd, Object* parent)
|
||||||
LocalSocket::LocalSocket(Object* parent)
|
LocalSocket::LocalSocket(Object* parent)
|
||||||
: Socket(Socket::Type::Local, parent)
|
: Socket(Socket::Type::Local, parent)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef SOCK_NONBLOCK
|
#ifdef SOCK_NONBLOCK
|
||||||
int fd = socket(AF_LOCAL, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0);
|
int fd = socket(AF_LOCAL, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -288,7 +288,6 @@ void AESCipher::encrypt_block(const AESCipherBlock& in, AESCipherBlock& out)
|
||||||
|
|
||||||
void AESCipher::decrypt_block(const AESCipherBlock& in, AESCipherBlock& out)
|
void AESCipher::decrypt_block(const AESCipherBlock& in, AESCipherBlock& out)
|
||||||
{
|
{
|
||||||
|
|
||||||
u32 s0, s1, s2, s3, t0, t1, t2, t3;
|
u32 s0, s1, s2, s3, t0, t1, t2, t3;
|
||||||
size_t r { 0 };
|
size_t r { 0 };
|
||||||
|
|
||||||
|
|
|
@ -185,7 +185,6 @@ private:
|
||||||
template<typename Callback>
|
template<typename Callback>
|
||||||
void DebugSession::run(DesiredInitialDebugeeState initial_debugee_state, Callback callback)
|
void DebugSession::run(DesiredInitialDebugeeState initial_debugee_state, Callback callback)
|
||||||
{
|
{
|
||||||
|
|
||||||
enum class State {
|
enum class State {
|
||||||
FirstIteration,
|
FirstIteration,
|
||||||
FreeRun,
|
FreeRun,
|
||||||
|
|
|
@ -504,7 +504,6 @@ TextPosition EditingEngine::find_end_of_next_word()
|
||||||
|
|
||||||
void EditingEngine::move_to_end_of_next_word()
|
void EditingEngine::move_to_end_of_next_word()
|
||||||
{
|
{
|
||||||
|
|
||||||
m_editor->set_cursor(find_end_of_next_word());
|
m_editor->set_cursor(find_end_of_next_word());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,6 @@ void VimCursor::move_backwards()
|
||||||
|
|
||||||
void VimMotion::add_key_code(KeyCode key, [[maybe_unused]] bool ctrl, bool shift, [[maybe_unused]] bool alt)
|
void VimMotion::add_key_code(KeyCode key, [[maybe_unused]] bool ctrl, bool shift, [[maybe_unused]] bool alt)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (is_complete())
|
if (is_complete())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -1088,7 +1088,6 @@ void Editor::cleanup_suggestions()
|
||||||
|
|
||||||
bool Editor::search(const StringView& phrase, bool allow_empty, bool from_beginning)
|
bool Editor::search(const StringView& phrase, bool allow_empty, bool from_beginning)
|
||||||
{
|
{
|
||||||
|
|
||||||
int last_matching_offset = -1;
|
int last_matching_offset = -1;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,6 @@ const CompletionSuggestion& SuggestionManager::suggest()
|
||||||
|
|
||||||
void SuggestionManager::set_current_suggestion_initiation_index(size_t index)
|
void SuggestionManager::set_current_suggestion_initiation_index(size_t index)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (m_last_shown_suggestion_display_length)
|
if (m_last_shown_suggestion_display_length)
|
||||||
m_last_shown_suggestion.start_index = index - m_next_suggestion_static_offset - m_last_shown_suggestion_display_length;
|
m_last_shown_suggestion.start_index = index - m_next_suggestion_static_offset - m_last_shown_suggestion_display_length;
|
||||||
else
|
else
|
||||||
|
|
|
@ -210,7 +210,6 @@ ALWAYS_INLINE ExecutionResult OpCode_FailForks::execute(const MatchInput& input,
|
||||||
|
|
||||||
ALWAYS_INLINE ExecutionResult OpCode_Jump::execute(const MatchInput&, MatchState& state, MatchOutput&) const
|
ALWAYS_INLINE ExecutionResult OpCode_Jump::execute(const MatchInput&, MatchState& state, MatchOutput&) const
|
||||||
{
|
{
|
||||||
|
|
||||||
state.instruction_position += offset();
|
state.instruction_position += offset();
|
||||||
return ExecutionResult::Continue;
|
return ExecutionResult::Continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,6 @@ int Shell::builtin_bg(int argc, const char** argv)
|
||||||
|
|
||||||
int Shell::builtin_type(int argc, const char** argv)
|
int Shell::builtin_type(int argc, const char** argv)
|
||||||
{
|
{
|
||||||
|
|
||||||
Vector<const char*> commands;
|
Vector<const char*> commands;
|
||||||
bool dont_show_function_source = false;
|
bool dont_show_function_source = false;
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,6 @@ static bool print_gid_list()
|
||||||
|
|
||||||
static bool print_full_id_list()
|
static bool print_full_id_list()
|
||||||
{
|
{
|
||||||
|
|
||||||
uid_t uid = getuid();
|
uid_t uid = getuid();
|
||||||
gid_t gid = getgid();
|
gid_t gid = getgid();
|
||||||
struct passwd* pw = getpwuid(uid);
|
struct passwd* pw = getpwuid(uid);
|
||||||
|
|
|
@ -20,7 +20,6 @@ static void test_send(int);
|
||||||
|
|
||||||
static void test(Function<void(int)> test_fn)
|
static void test(Function<void(int)> test_fn)
|
||||||
{
|
{
|
||||||
|
|
||||||
int fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
int fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
perror("socket");
|
perror("socket");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue