cache.h: put single NUL at end of struct cache_entry

Since in-memory index entries are allocated individually now, the
variable slack at the end meant to provide an eight byte alignment
is not needed anymore.  Have a single NUL instead.  This saves zero
to seven bytes for an entry, depending on its filename length.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe 2011-10-25 20:00:04 +02:00 коммит произвёл Junio C Hamano
Родитель debed2a629
Коммит ee7825b58c
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -306,7 +306,7 @@ static inline unsigned int canon_mode(unsigned int mode)
} }
#define flexible_size(STRUCT,len) ((offsetof(struct STRUCT,name) + (len) + 8) & ~7) #define flexible_size(STRUCT,len) ((offsetof(struct STRUCT,name) + (len) + 8) & ~7)
#define cache_entry_size(len) flexible_size(cache_entry,len) #define cache_entry_size(len) (offsetof(struct cache_entry,name) + (len) + 1)
#define ondisk_cache_entry_size(len) flexible_size(ondisk_cache_entry,len) #define ondisk_cache_entry_size(len) flexible_size(ondisk_cache_entry,len)
#define ondisk_cache_entry_extended_size(len) flexible_size(ondisk_cache_entry_extended,len) #define ondisk_cache_entry_extended_size(len) flexible_size(ondisk_cache_entry_extended,len)