Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
c36b5e0f
...
c36b5e0f41b44370b9a78e6b814348399007da40
authored
2009-02-10 17:21:59 +0200
by
Serge Monkewitz
Committed by
Sergey Poznyakoff
2009-02-10 17:21:59 +0200
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fix alignment bug in assoc.c
1 parent
b2a91252
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
mailbox/assoc.c
mailbox/assoc.c
View file @
c36b5e0
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2007 Free Software Foundation, Inc.
Copyright (C) 2007
, 2009
Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -58,7 +58,19 @@ struct _mu_assoc
mu_iterator_t
itr
;
};
#define ASSOC_ELEM_SIZE(a) ((a)->elsize + sizeof(struct _mu_assoc_elem) - 1)
struct
_mu_assoc_elem_align
{
char
c
;
struct
_mu_assoc_elem
x
;
};
#define __ASSOC_ELEM_ALIGNMENT (mu_offsetof(struct _mu_assoc_elem_align, x))
#define __ASSOC_ELEM_SIZE(a) \
((a)->elsize + mu_offsetof(struct _mu_assoc_elem, data))
#define __ASSOC_ALIGN(a, b) (((a) + (b) - 1) & ~((b) - 1))
#define ASSOC_ELEM_SIZE(a) \
__ASSOC_ALIGN(__ASSOC_ELEM_SIZE(a),__ASSOC_ELEM_ALIGNMENT)
#define __ASSOC_ELEM(a,p,n) \
((struct _mu_assoc_elem*) ((char*) (p) + ASSOC_ELEM_SIZE (a) * n))
...
...
Please
register
or
sign in
to post a comment