diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-12-14 00:27:59 -0800 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-12-14 00:27:59 -0800 |
commit | ce19a52a3422332d55d8c0f601f30c2e67c14f09 (patch) | |
tree | 08cddeca1c4f25196ad4ffd73ae3abbda4b1aa15 /nasmlib | |
parent | 374312cde4d44f8849d602cc5c9ea634798b9c50 (diff) | |
download | nasm-ce19a52a3422332d55d8c0f601f30c2e67c14f09.tar.gz |
Define and use offsetin() instead of offsetof()
New macro which defines the offset on an object rather than a
type. This macro, as far as I know, ought to be fully portable, unlike
the fallback version of offsetof().
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'nasmlib')
-rw-r--r-- | nasmlib/strlist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nasmlib/strlist.c b/nasmlib/strlist.c index 506ad50e..a0687cce 100644 --- a/nasmlib/strlist.c +++ b/nasmlib/strlist.c @@ -108,7 +108,7 @@ strlist_vprintf(struct strlist *list, const char *fmt, va_list ap) if (!list) return NULL; - e = nasm_vaxprintf(offsetof(struct strlist_entry, str), fmt, ap); + e = nasm_vaxprintf(offsetin(*e, str), fmt, ap); e->size = nasm_aprintf_size(); if (list->uniq) { |