Skip to content

Commit

Permalink
SystemServer: Minor #include cleanup in Service.cpp (SerenityOS#3227)
Browse files Browse the repository at this point in the history
  • Loading branch information
tryfinally committed Aug 20, 2020
1 parent d4d9222 commit 16e86a3
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Services/SystemServer/Service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
#include <AK/JsonArray.h>
#include <AK/JsonObject.h>
#include <LibCore/ConfigFile.h>
#include <LibCore/LocalSocket.h>
#include <fcntl.h>
#include <LibCore/Socket.h>
#include <grp.h>
#include <libgen.h>
#include <pwd.h>
Expand Down Expand Up @@ -168,13 +167,13 @@ void Service::handle_socket_connection()
dbg() << "Ready to read on behalf of " << name();
#endif
if (m_accept_socket_connections) {
int accepted_fd = accept(m_socket_fd, nullptr, nullptr);
if (accepted_fd < 0) {
perror("accept");
return;
}
spawn(accepted_fd);
close(accepted_fd);
int accepted_fd = accept(m_socket_fd, nullptr, nullptr);
if (accepted_fd < 0) {
perror("accept");
return;
}
spawn(accepted_fd);
close(accepted_fd);
} else {
remove_child(*m_socket_notifier);
m_socket_notifier = nullptr;
Expand Down

0 comments on commit 16e86a3

Please sign in to comment.