From 594aec07b3b0511754129be74a8d643c38e1ae77 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 6 Aug 2017 22:40:05 +0200 Subject: [PATCH] server: Remove unused ->peer from struct command_context. It is initialized in handle_connect() but never used. --- command.c | 2 +- command.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/command.c b/command.c index 0b06e5c0..077c159d 100644 --- a/command.c +++ b/command.c @@ -892,7 +892,7 @@ __noreturn void handle_connect(int fd, const char *peername) unsigned char challenge_hash[HASH_SIZE]; char *command = NULL, *buf = para_malloc(HANDSHAKE_BUFSIZE) /* must be on the heap */; size_t numbytes; - struct command_context cc_struct = {.peer = peername}, *cc = &cc_struct; + struct command_context cc_struct = {.u = NULL}, *cc = &cc_struct; struct iovec iov; struct connection_features cf; diff --git a/command.h b/command.h index 5b01eb79..0265f056 100644 --- a/command.h +++ b/command.h @@ -2,8 +2,6 @@ /** Per connection data available to command handlers. */ struct command_context { - /** Network address of the peer. */ - const char *peer; /** The paraslash user that executes this command. */ struct user *u; /** File descriptor and crypto keys. */ -- 2.30.2