diff options
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/ntapi_tt_mount.c | 4 | ||||
-rw-r--r-- | src/fs/ntapi_tt_stat.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/fs/ntapi_tt_mount.c b/src/fs/ntapi_tt_mount.c index f5ae113..448841e 100644 --- a/src/fs/ntapi_tt_mount.c +++ b/src/fs/ntapi_tt_mount.c @@ -105,7 +105,7 @@ static int32_t __stdcall __tt_get_dos_drive_device_or_root_handle( else return NT_STATUS_INVALID_PARAMETER_2; - dos_name.strlen = ((size_t)(&((_dos_name_buffer *)0)->root)); + dos_name.strlen = __offsetof(_dos_name_buffer,root); dos_name.maxlen = 0; dos_name.buffer = &(dos_name_buffer.global_prefix[0]); @@ -232,7 +232,7 @@ int32_t __stdcall __ntapi_tt_get_dos_drive_mount_points( dev_mount_point->symlink_name_length = 0; dev_mount_point->unique_id_offset = 0; dev_mount_point->unique_id_length = 0; - dev_mount_point->device_name_offset = ((size_t)(&((nt_mount_point_param *)0)->device_name)); + dev_mount_point->device_name_offset = __offsetof(nt_mount_point_param,device_name); dev_mount_point->device_name_length = dev_name->name_length; dev_mount_point->mount_points_offset = 0; diff --git a/src/fs/ntapi_tt_stat.c b/src/fs/ntapi_tt_stat.c index cab84c3..088adf6 100644 --- a/src/fs/ntapi_tt_stat.c +++ b/src/fs/ntapi_tt_stat.c @@ -56,7 +56,7 @@ int32_t __stdcall __ntapi_tt_stat( __ntapi->tt_aligned_block_memcpy( (uintptr_t *)stat, (uintptr_t *)buffer, - ((size_t)(&((nt_fai *)0)->name_info))); + __offsetof(nt_fai,name_info)); /* record volume-relative file name length */ fai = (nt_fai *)buffer; |