summaryrefslogtreecommitdiffhomepage
path: root/src/argv
diff options
context:
space:
mode:
Diffstat (limited to 'src/argv')
-rw-r--r--src/argv/ntapi_tt_argv_envp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/argv/ntapi_tt_argv_envp.c b/src/argv/ntapi_tt_argv_envp.c
index 1c20cfc..b0a5afe 100644
--- a/src/argv/ntapi_tt_argv_envp.c
+++ b/src/argv/ntapi_tt_argv_envp.c
@@ -706,12 +706,9 @@ wchar16_t * __stdcall __ntapi_tt_get_cmd_line_utf16(void)
wchar16_t * __stdcall __ntapi_tt_get_peb_env_block_utf16(void)
{
- nt_peb * peb;
-
- peb = (nt_peb *)pe_get_peb_address();
+ nt_peb * peb;
- if (peb)
- return peb->process_params->environment;
- else
- return (wchar16_t *)0;
+ return (peb = (nt_peb *)pe_get_peb_address())
+ ? peb->process_params->environment
+ : 0;
}