From 6866780115a7c0af034f287d965f4bf6b02c1e6d Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Tue, 7 May 2013 21:07:39 -0400 Subject: Rearrange a few fields to reduce holes --- src/core/socket.h | 7 ++++--- src/journal/journal-internal.h | 9 +++++---- src/journal/mmap-cache.c | 5 ++--- 3 files changed, 11 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/core/socket.h b/src/core/socket.h index 4826bb331b..9d48cde0a6 100644 --- a/src/core/socket.h +++ b/src/core/socket.h @@ -130,6 +130,10 @@ struct Socket { bool broadcast; bool pass_cred; bool pass_sec; + + /* Only for INET6 sockets: issue IPV6_V6ONLY sockopt */ + SocketAddressBindIPv6Only bind_ipv6_only; + int priority; int mark; size_t receive_buffer; @@ -142,9 +146,6 @@ struct Socket { long mq_maxmsg; long mq_msgsize; - /* Only for INET6 sockets: issue IPV6_V6ONLY sockopt */ - SocketAddressBindIPv6Only bind_ipv6_only; - char *smack; char *smack_ip_in; char *smack_ip_out; diff --git a/src/journal/journal-internal.h b/src/journal/journal-internal.h index eea56e4713..c7e585d810 100644 --- a/src/journal/journal-internal.h +++ b/src/journal/journal-internal.h @@ -74,19 +74,20 @@ typedef enum LocationType { struct Location { LocationType type; + bool seqnum_set; + bool realtime_set; + bool monotonic_set; + bool xor_hash_set; + uint64_t seqnum; sd_id128_t seqnum_id; - bool seqnum_set; uint64_t realtime; - bool realtime_set; uint64_t monotonic; sd_id128_t boot_id; - bool monotonic_set; uint64_t xor_hash; - bool xor_hash_set; }; struct Directory { diff --git a/src/journal/mmap-cache.c b/src/journal/mmap-cache.c index 54bf1148e1..767f555526 100644 --- a/src/journal/mmap-cache.c +++ b/src/journal/mmap-cache.c @@ -41,9 +41,9 @@ struct Window { bool keep_always; bool in_unused; + int prot; void *ptr; uint64_t offset; - int prot; size_t size; FileDescriptor *fd; @@ -70,12 +70,11 @@ struct FileDescriptor { struct MMapCache { int n_ref; + unsigned n_windows; Hashmap *fds; Hashmap *contexts; - unsigned n_windows; - LIST_HEAD(Window, unused); Window *last_unused; }; -- cgit v1.2.3-54-g00ecf