From 0e110c311ec26700585ae89846f2939d9000b7d1 Mon Sep 17 00:00:00 2001 From: DustyBagel Date: Fri, 27 Sep 2024 21:41:33 -0500 Subject: [PATCH] Fix Whitespace pr check issues --- src/network/lan.cpp | 6 +----- src/script/lua_api/l_mainmenu.cpp | 2 +- src/server.cpp | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/network/lan.cpp b/src/network/lan.cpp index 7762edfde..60b663b12 100644 --- a/src/network/lan.cpp +++ b/src/network/lan.cpp @@ -163,16 +163,12 @@ void lan_adv::send_string(const std::string &str) addr.sin_port = htons(adv_port); UDPSocket socket_send(false); - // Full discloser, the use of inet_proto and the mreq stucture - // were suggested by ai. - inet_pton(AF_INET, adv_multicast_addr, &(addr.sin_addr)); struct ip_mreq mreq; mreq.imr_multiaddr.s_addr = inet_addr(adv_multicast_addr); mreq.imr_interface.s_addr = htonl(INADDR_ANY); - setsockopt(socket_send.GetHandle(), IPPROTO_IP, IP_ADD_MEMBERSHIP, (const char *)&mreq, sizeof(mreq)); @@ -191,7 +187,7 @@ void lan_adv::serve(unsigned short port) { server_port = port; stop(); - start(); + start(); } void *lan_adv::run() diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp index 4ec1fc316..c7f016a8d 100644 --- a/src/script/lua_api/l_mainmenu.cpp +++ b/src/script/lua_api/l_mainmenu.cpp @@ -1120,7 +1120,7 @@ int ModApiMainMenu::l_get_lan_servers(lua_State *L) lua_pushstring(L, field_name.c_str()); if (server.second[field_name].isString()) lua_pushstring(L, server.second[field_name].asCString()); - else if (server.second[field_name].isConvertibleTo(Json::realValue)) + else if (server.second[field_name].isConvertibleTo(Json::realValue)) lua_pushnumber(L, server.second[field_name].asDouble()); else lua_pushnil(L); diff --git a/src/server.cpp b/src/server.cpp index fc7b7f8c7..7ce21acab 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -420,7 +420,7 @@ Server::~Server() // Wait until the lan_adv_server thread has finished. // This is so that its thread destructor doesn't kill the thread // before it sends the 'shutdown' command to remove this server's - // server info from the serverlist of local clients. + // server info from the serverlist of local clients. } } }