mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-03 13:40:37 -05:00
ITS#6303: fix broken variant of the struct hack
This commit is contained in:
parent
42b870f9bb
commit
e6fc72d3c6
1 changed files with 3 additions and 3 deletions
|
|
@ -593,9 +593,9 @@ typedef struct bvlist {
|
|||
char *trunc; /* filename was truncated here */
|
||||
int inum; /* num from "attr={num}" in filename, or INT_MIN */
|
||||
char savech; /* original char at *trunc */
|
||||
char fname; /* variable length array BVL_NAME(bvl) = &fname */
|
||||
# define BVL_NAME(bvl) ((char *) (bvl) + offsetof(bvlist, fname))
|
||||
# define BVL_SIZE(namelen) (sizeof(bvlist) + (namelen))
|
||||
/* BVL_NAME(&bvlist) is the filename, allocated after the struct: */
|
||||
# define BVL_NAME(bvl) ((char *) ((bvl) + 1))
|
||||
# define BVL_SIZE(namelen) (sizeof(bvlist) + (namelen) + 1)
|
||||
} bvlist;
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Reference in a new issue