Hi

The theoretical maximum of the strftime string is somewhere around 18 bytes.
Make it 24 to have some extra, and to be a nicely cacheable multiple.

- Lauri
>From 755b24ca723c95fad31e3b6dc8cd2d6cbac78ed9 Mon Sep 17 00:00:00 2001
From: Lauri Kasanen <[email protected]>
Date: Sun, 16 Dec 2012 14:16:07 +0200
Subject: [PATCH 3/7] dirlisting: Mem-optimize mk_f_list, 112 -> 88 bytes

The theoretical maximum of the strftime string is somewhere around 18 bytes.
Make it 24 to have some extra, and to be a nicely cacheable multiple.

Signed-off-by: Lauri Kasanen <[email protected]>
---
 plugins/dirlisting/dirlisting.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/plugins/dirlisting/dirlisting.h b/plugins/dirlisting/dirlisting.h
index d99f307..8b30ba4 100644
--- a/plugins/dirlisting/dirlisting.h
+++ b/plugins/dirlisting/dirlisting.h
@@ -34,7 +34,7 @@
 #define MK_DIRHTML_BUFFER_GROW 5
 
 #define MK_HEADER_CHUNKED "Transfer-Encoding: Chunked\r\n\r\n"
-#define MK_DIRHTML_FMOD_LEN 50
+#define MK_DIRHTML_FMOD_LEN 24
 
 /* Theme files */
 #define MK_DIRHTML_FILE_HEADER "header.theme"
@@ -62,12 +62,12 @@ struct plugin_api *mk_api;
 
 struct mk_f_list
 {
-    char *name;
-    char *size;
     char ft_modif[MK_DIRHTML_FMOD_LEN];
-    unsigned char type;
     struct file_info info;
+    char *name;
+    char *size;
     struct mk_f_list *next;
+    unsigned char type;
 };
 
 /* Main configuration of dirhtml module */
-- 
1.7.2.1

_______________________________________________
Monkey mailing list
[email protected]
http://lists.monkey-project.com/listinfo/monkey

Reply via email to