summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/gcm.h
diff options
context:
space:
mode:
authorSimon Rettberg2024-04-12 14:52:06 +0200
committerSimon Rettberg2024-04-12 14:52:06 +0200
commit2ae76865d3d109712f9ee488cbc19bd107bbc9ab (patch)
tree36e7310eb089cf7fd3496e5c32c70981e447f235 /src/include/ipxe/gcm.h
parentMerge branch 'aqc1xx' into openslx (diff)
parent[netdevice] Add "linktype" setting (diff)
downloadipxe-2ae76865d3d109712f9ee488cbc19bd107bbc9ab.tar.gz
ipxe-2ae76865d3d109712f9ee488cbc19bd107bbc9ab.tar.xz
ipxe-2ae76865d3d109712f9ee488cbc19bd107bbc9ab.zip
Merge branch 'master' into openslxopenslx
Diffstat (limited to 'src/include/ipxe/gcm.h')
-rw-r--r--src/include/ipxe/gcm.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/include/ipxe/gcm.h b/src/include/ipxe/gcm.h
index 4864445d..2c785a97 100644
--- a/src/include/ipxe/gcm.h
+++ b/src/include/ipxe/gcm.h
@@ -89,10 +89,9 @@ static int _gcm_name ## _setkey ( void *ctx, const void *key, \
size_t keylen ) { \
struct _gcm_name ## _context *context = ctx; \
build_assert ( _blocksize == sizeof ( context->gcm.key ) ); \
- build_assert ( ( ( void * ) &context->gcm ) == \
- ( ( void * ) context ) ); \
- build_assert ( ( ( void * ) &context->raw ) == \
- ( ( void * ) context->gcm.raw_ctx ) ); \
+ build_assert ( offsetof ( typeof ( *context ), gcm ) == 0 ); \
+ build_assert ( offsetof ( typeof ( *context ), raw ) == \
+ offsetof ( typeof ( *context ), gcm.raw_ctx ) ); \
return gcm_setkey ( &context->gcm, key, keylen, &_raw_cipher ); \
} \
static void _gcm_name ## _setiv ( void *ctx, const void *iv, \