From a738157be0ea0c08564aadf6f59df5f3702ce8ce Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 16 Mar 2018 23:15:24 +0000 Subject: code maintenance: incorporate use of the __offsetof convenience macro. --- src/msq/ntapi_msq_connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/msq') diff --git a/src/msq/ntapi_msq_connect.c b/src/msq/ntapi_msq_connect.c index c4a0f98..301adfa 100644 --- a/src/msq/ntapi_msq_connect.c +++ b/src/msq/ntapi_msq_connect.c @@ -114,7 +114,7 @@ static int32_t __msqpid_symlink_set( __ntapi->tt_port_name_from_attr( &svcname,&msqctl->attr); - str.strlen = (uint16_t)(size_t)(&(((nt_port_name *)0)->null_termination)); + str.strlen = (uint16_t)(__offsetof(nt_port_name,null_termination)); str.maxlen = sizeof(nt_port_name); str.buffer = svcname.base_named_objects; -- cgit v1.2.3