summaryrefslogtreecommitdiffhomepage
path: root/src/fs/ntapi_tt_stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/ntapi_tt_stat.c')
-rw-r--r--src/fs/ntapi_tt_stat.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/fs/ntapi_tt_stat.c b/src/fs/ntapi_tt_stat.c
index 7c7afed..b94b08f 100644
--- a/src/fs/ntapi_tt_stat.c
+++ b/src/fs/ntapi_tt_stat.c
@@ -144,18 +144,15 @@ int32_t __stdcall __ntapi_tt_stat(
hash,wch_mark,
sizeof(wchar16_t)*(wch-wch_mark));
- if (!(flags & NT_STAT_DEV_NAME_COPY)) {
- *stat->dev_name = 0;
+ if (!(flags & NT_STAT_DEV_NAME_COPY))
return NT_STATUS_SUCCESS;
- } else if (stat->dev_name_maxlen < sdev->strlen) {
- *stat->dev_name = 0;
+ else if (stat->dev_name_maxlen < sdev->strlen)
return NT_STATUS_BUFFER_TOO_SMALL;
- }
__ntapi->tt_memcpy_utf16(
(wchar16_t *)stat->dev_name,
(wchar16_t *)sdev->buffer,
- stat->dev_name_strlen);
+ sdev->strlen);
return NT_STATUS_SUCCESS;
}