Discussion:
[OpenOCD-devel] [PATCH]: 1fa3503 telnet_server: drop unused options
gerrit
2017-05-10 15:51:24 UTC
Permalink
This is an automated email from Gerrit.

Karl Palsson (***@tweak.net.au) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/4131

-- gerrit

commit 1fa3503fa7a820b498eb726c082ac846d3009865
Author: Karl Palsson <***@tweak.net.au>
Date: Wed May 10 14:31:18 2017 +0000

telnet_server: drop unused options

They're never used, so just drop them.

Change-Id: Ie137deed3e7258f9d6af7e0cb508e73df0f53ee0
Signed-off-by: Karl Palsson <***@tweak.net.au>

diff --git a/src/server/telnet_server.c b/src/server/telnet_server.c
index e33188b..7507afe 100644
--- a/src/server/telnet_server.c
+++ b/src/server/telnet_server.c
@@ -222,7 +222,6 @@ static int telnet_new_connection(struct connection *connection)
telnet_connection->closed = 0;
telnet_connection->line_size = 0;
telnet_connection->line_cursor = 0;
- telnet_connection->option_size = 0;
telnet_connection->prompt = strdup("> ");
telnet_connection->state = TELNET_STATE_DATA;

diff --git a/src/server/telnet_server.h b/src/server/telnet_server.h
index 04ba965..e43d6bc 100644
--- a/src/server/telnet_server.h
+++ b/src/server/telnet_server.h
@@ -29,7 +29,6 @@

#define TELNET_BUFFER_SIZE (1024)

-#define TELNET_OPTION_MAX_SIZE (128)
#define TELNET_LINE_HISTORY_SIZE (128)
#define TELNET_LINE_MAX_SIZE (256)

@@ -51,8 +50,6 @@ struct telnet_connection {
char line[TELNET_LINE_MAX_SIZE];
int line_size;
int line_cursor;
- char option[TELNET_OPTION_MAX_SIZE];
- int option_size;
char last_escape;
char *history[TELNET_LINE_HISTORY_SIZE];
int next_history;
diff --git a/src/target/openrisc/jsp_server.c b/src/target/openrisc/jsp_server.c
index e581fb8..2d90114 100644
--- a/src/target/openrisc/jsp_server.c
+++ b/src/target/openrisc/jsp_server.c
@@ -88,7 +88,6 @@ static int jsp_new_connection(struct connection *connection)
telnet_connection->closed = 0;
telnet_connection->line_size = 0;
telnet_connection->line_cursor = 0;
- telnet_connection->option_size = 0;
telnet_connection->state = TELNET_STATE_DATA;

/* negotiate telnet options */

--

Loading...