From: Øyvind H. <go...@us...> - 2010-03-24 07:47:23
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 1cda3e64e4555d64496709b23f0af1da8f3a7034 (commit) via 9f1d9499ce5d15f25c3d0f150348e16deb2e7aaf (commit) from 721502f1d3a0d506bc0e814926368fbedda60028 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1cda3e64e4555d64496709b23f0af1da8f3a7034 Author: Antonio Borneo <bor...@gm...> Date: Wed Mar 24 12:08:45 2010 +0800 server: review unused symbols Remove unused function Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/server/server.c b/src/server/server.c index 1a6250c..0d3273b 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -233,34 +233,6 @@ int add_service(char *name, enum connection_type type, unsigned short port, int return ERROR_OK; } -int remove_service(unsigned short port) -{ - struct service **p = &services; - struct service *c; - - /* find service */ - while ((c = *p)) - { - if (c->port == port) - { - if (c->name) - free(c->name); - - if (c->priv) - free(c->priv); - - /* delete service */ - *p = c->next; - free(c); - } - - /* redirect p to next list pointer */ - p = &(*p)->next; - } - - return ERROR_OK; -} - static int remove_services(void) { struct service *c = services; commit 9f1d9499ce5d15f25c3d0f150348e16deb2e7aaf Author: Antonio Borneo <bor...@gm...> Date: Wed Mar 24 12:06:45 2010 +0800 server: review scope of functions and data Add "static" qualifier to private functions and data. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/server/server.c b/src/server/server.c index 173beb8..1a6250c 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -40,7 +40,7 @@ #endif -struct service *services = NULL; +static struct service *services = NULL; /* shutdown_openocd == 1: exit the main event loop, and quit the debugger */ static int shutdown_openocd = 0; @@ -48,7 +48,7 @@ static int shutdown_openocd = 0; /* set when using pipes rather than tcp */ int server_use_pipes = 0; -int add_connection(struct service *service, struct command_context *cmd_ctx) +static int add_connection(struct service *service, struct command_context *cmd_ctx) { socklen_t address_size; struct connection *c, **p; @@ -112,7 +112,7 @@ int add_connection(struct service *service, struct command_context *cmd_ctx) return ERROR_OK; } -int remove_connection(struct service *service, struct connection *connection) +static int remove_connection(struct service *service, struct connection *connection) { struct connection **p = &service->connections; struct connection *c; @@ -261,7 +261,7 @@ int remove_service(unsigned short port) return ERROR_OK; } -int remove_services(void) +static int remove_services(void) { struct service *c = services; ----------------------------------------------------------------------- Summary of changes: src/server/server.c | 36 ++++-------------------------------- 1 files changed, 4 insertions(+), 32 deletions(-) hooks/post-receive -- Main OpenOCD repository |