Hi We need pointers, not full structs in toc.
- Lauri
>From 2134c7234b971fbbb9ed3a19030674f4b1174cc0 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen <[email protected]> Date: Sun, 16 Dec 2012 14:08:28 +0200 Subject: [PATCH 2/7] dirlisting: Don't allocate unneeded memory, save 104 bytes per entry We need pointers, not full structs in toc. Signed-off-by: Lauri Kasanen <[email protected]> --- plugins/dirlisting/dirlisting.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/plugins/dirlisting/dirlisting.c b/plugins/dirlisting/dirlisting.c index e4bc1df..fe49327 100644 --- a/plugins/dirlisting/dirlisting.c +++ b/plugins/dirlisting/dirlisting.c @@ -705,7 +705,7 @@ int mk_dirhtml_init(struct client_session *cs, struct session_request *sr) values_global, is_chunked); /* Creating table of contents and sorting */ - toc = mk_api->mem_alloc(sizeof(struct mk_f_list) * list_len); + toc = mk_api->mem_alloc(sizeof(struct mk_f_list *) * list_len); entry = file_list; i = 0; while (entry) { -- 1.7.2.1
_______________________________________________ Monkey mailing list [email protected] http://lists.monkey-project.com/listinfo/monkey
