From 7d94ddaedfa838c45ca05f2fd7f77472fa31cf5b Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Fri, 18 Dec 2020 11:19:56 +0800 Subject: [PATCH] Optimize code Signed-off-by: Jianhui Zhao --- src/uhttpd.c | 2 -- src/uhttpd.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/uhttpd.c b/src/uhttpd.c index 904586e..7b0a61c 100644 --- a/src/uhttpd.c +++ b/src/uhttpd.c @@ -175,7 +175,6 @@ static int uh_load_plugin(struct uh_server *srv, const char *path) } p->next = srv->plugins; - srv->plugins->prev = p; srv->plugins = p; return 0; @@ -204,7 +203,6 @@ static int uh_add_path_handler(struct uh_server *srv, const char *path, uh_path_ } h->next = srv->handlers; - srv->handlers->prev = h; srv->handlers = h; return 0; diff --git a/src/uhttpd.h b/src/uhttpd.h index edbfbf7..12ca32d 100644 --- a/src/uhttpd.h +++ b/src/uhttpd.h @@ -41,7 +41,6 @@ struct uh_plugin_handler { struct uh_plugin { struct uh_plugin_handler *h; void *dlh; - struct uh_plugin *prev; struct uh_plugin *next; }; @@ -52,7 +51,6 @@ enum { struct uh_path_handler { uh_path_handler_prototype handler; - struct uh_path_handler *prev; struct uh_path_handler *next; char path[0]; };