diff options
author | midipix <writeonce@midipix.org> | 2018-06-16 20:58:15 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-06-16 18:35:54 -0400 |
commit | c4fe1edd2cc367994ea57a0ab8f3e870db9e6bec (patch) | |
tree | 9a3eecf28ae18a310bb04a3c1b3677dae93b64dd /src/pty/ntapi_pty_set.c | |
parent | 3a666612f7f228ec6600262f14bce55f7a41a7e5 (diff) | |
download | ntapi-c4fe1edd2cc367994ea57a0ab8f3e870db9e6bec.tar.bz2 ntapi-c4fe1edd2cc367994ea57a0ab8f3e870db9e6bec.tar.xz |
pty query/set interfaces: code maintenance, whitespace meditation.
Diffstat (limited to 'src/pty/ntapi_pty_set.c')
-rw-r--r-- | src/pty/ntapi_pty_set.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/pty/ntapi_pty_set.c b/src/pty/ntapi_pty_set.c index 1b7074c..0793dc6 100644 --- a/src/pty/ntapi_pty_set.c +++ b/src/pty/ntapi_pty_set.c @@ -24,12 +24,16 @@ int32_t __stdcall __ntapi_pty_set( if (pty_info_class>=NT_PTY_INFORMATION_CAP) return NT_STATUS_INVALID_INFO_CLASS; - else if (pty_info_class == NT_PTY_BASIC_INFORMATION) + + if (pty_info_class == NT_PTY_BASIC_INFORMATION) return NT_STATUS_NOT_IMPLEMENTED; - else if (pty_info_class == NT_PTY_INHERIT_INFORMATION) + + if (pty_info_class == NT_PTY_INHERIT_INFORMATION) return NT_STATUS_INVALID_INFO_CLASS; - else if ((pty_info_class == NT_PTY_CLIENT_INFORMATION) && (pty_info_length != sizeof(nt_pty_client_info))) - return NT_STATUS_INVALID_PARAMETER; + + if (pty_info_class == NT_PTY_CLIENT_INFORMATION) + if (pty_info_length != sizeof(nt_pty_client_info)) + return NT_STATUS_INVALID_PARAMETER; __ntapi->tt_aligned_block_memset( &msg,0,sizeof(msg)); @@ -48,7 +52,7 @@ int32_t __stdcall __ntapi_pty_set( &msg.data.ctlinfo.guid, &pty->guid); - info = (uintptr_t *)pty_info; + info = (uintptr_t *)pty_info; msg.data.ctlinfo.ctxarg[0] = info[0]; msg.data.ctlinfo.ctxarg[1] = info[1]; msg.data.ctlinfo.ctxarg[2] = info[2]; @@ -56,6 +60,7 @@ int32_t __stdcall __ntapi_pty_set( if ((status = __ntapi->zw_request_wait_reply_port(pty->hport,&msg,&msg))) return status; + else if (msg.data.ttyinfo.status) return msg.data.ttyinfo.status; |