Skip to content

Commit 28bc97b

Browse files
committed
Networking (Linux): remove unnecessary variables
1 parent dbc5a79 commit 28bc97b

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/common/networking/networking.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ typedef struct FFNetworkingState {
1515
OVERLAPPED overlapped;
1616
#else
1717
int sockfd;
18-
FFstrbuf host;
1918
FFstrbuf command;
2019
struct addrinfo* addr;
2120

src/common/networking/networking_linux.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static const char* tryTcpFastOpen(FFNetworkingState* state)
2424
FF_UNUSED(state);
2525
return "TCP Fast Open not supported";
2626
#else
27-
FF_DEBUG("Attempting to use TCP Fast Open to connect to %s", state->host.chars);
27+
FF_DEBUG("Attempting to use TCP Fast Open to connect");
2828

2929
#ifndef __APPLE__ // On macOS, TCP_FASTOPEN doesn't seem to be needed
3030
// Set TCP Fast Open
@@ -97,7 +97,6 @@ static const char* tryTcpFastOpen(FFNetworkingState* state)
9797
sent, errno, strerror(errno));
9898
freeaddrinfo(state->addr);
9999
state->addr = NULL;
100-
ffStrbufDestroy(&state->host);
101100
ffStrbufDestroy(&state->command);
102101
return NULL;
103102
}
@@ -124,7 +123,7 @@ static const char* tryTcpFastOpen(FFNetworkingState* state)
124123
static const char* connectAndSend(FFNetworkingState* state)
125124
{
126125
const char* ret = NULL;
127-
FF_DEBUG("Using traditional connection method to connect to %s", state->host.chars);
126+
FF_DEBUG("Using traditional connection method to connect");
128127

129128
FF_DEBUG("Attempting connect() to server...");
130129
if(connect(state->sockfd, state->addr->ai_addr, state->addr->ai_addrlen) == -1)
@@ -155,7 +154,6 @@ static const char* connectAndSend(FFNetworkingState* state)
155154
FF_DEBUG("Releasing address info and other resources");
156155
freeaddrinfo(state->addr);
157156
state->addr = NULL;
158-
ffStrbufDestroy(&state->host);
159157
ffStrbufDestroy(&state->command);
160158

161159
return ret;
@@ -169,8 +167,6 @@ static const char* initNetworkingState(FFNetworkingState* state, const char* hos
169167
FF_DEBUG("Initializing network connection state: host=%s, path=%s", host, path);
170168

171169
// Initialize command and host information
172-
ffStrbufInitS(&state->host, host);
173-
174170
ffStrbufInitA(&state->command, 64);
175171
ffStrbufAppendS(&state->command, "GET ");
176172
ffStrbufAppendS(&state->command, path);

0 commit comments

Comments
 (0)