Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
615e9572
Commit
615e9572
authored
Oct 21, 2011
by
Marcus Meissner
Committed by
Alexandre Julliard
Oct 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Avoid shadowing variables "a", "nt" and "fd".
parent
69b71361
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
16 deletions
+14
-16
process.c
dlls/kernel32/process.c
+14
-16
No files found.
dlls/kernel32/process.c
View file @
615e9572
...
...
@@ -804,7 +804,6 @@ static BOOL build_command_line( WCHAR **argv )
*
p
++=
'"'
;
if
(
has_quote
)
{
int
bcount
;
WCHAR
*
a
;
bcount
=
0
;
a
=*
arg
;
...
...
@@ -1510,17 +1509,16 @@ static int fork_and_exec( const char *filename, const WCHAR *cmdline, const WCHA
if
(
flags
&
(
CREATE_NEW_PROCESS_GROUP
|
CREATE_NEW_CONSOLE
|
DETACHED_PROCESS
))
{
int
pid
;
if
(
!
(
pid
=
fork
()))
{
int
fd
=
open
(
"/dev/null"
,
O_RDWR
);
int
null
fd
=
open
(
"/dev/null"
,
O_RDWR
);
setsid
();
/* close stdin and stdout */
if
(
fd
!=
-
1
)
if
(
null
fd
!=
-
1
)
{
dup2
(
fd
,
0
);
dup2
(
fd
,
1
);
close
(
fd
);
dup2
(
null
fd
,
0
);
dup2
(
null
fd
,
1
);
close
(
null
fd
);
}
}
else
if
(
pid
!=
-
1
)
_exit
(
0
);
/* parent */
...
...
@@ -2250,14 +2248,14 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A
if
(
env
&&
!
(
flags
&
CREATE_UNICODE_ENVIRONMENT
))
/* convert environment to unicode */
{
char
*
p
=
env
;
char
*
e
=
env
;
DWORD
lenW
;
while
(
*
p
)
p
+=
strlen
(
p
)
+
1
;
p
++
;
/* final null */
lenW
=
MultiByteToWideChar
(
CP_ACP
,
0
,
env
,
p
-
(
char
*
)
env
,
NULL
,
0
);
while
(
*
e
)
e
+=
strlen
(
e
)
+
1
;
e
++
;
/* final null */
lenW
=
MultiByteToWideChar
(
CP_ACP
,
0
,
env
,
e
-
(
char
*
)
env
,
NULL
,
0
);
envW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lenW
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
env
,
p
-
(
char
*
)
env
,
envW
,
lenW
);
MultiByteToWideChar
(
CP_ACP
,
0
,
env
,
e
-
(
char
*
)
env
,
envW
,
lenW
);
flags
|=
CREATE_UNICODE_ENVIRONMENT
;
}
...
...
@@ -3206,11 +3204,11 @@ DWORD WINAPI GetProcessVersion( DWORD pid )
if
(
!
pid
||
pid
==
GetCurrentProcessId
())
{
IMAGE_NT_HEADERS
*
nt
;
IMAGE_NT_HEADERS
*
p
nt
;
if
((
nt
=
RtlImageNtHeader
(
NtCurrentTeb
()
->
Peb
->
ImageBaseAddress
)))
return
((
nt
->
OptionalHeader
.
MajorSubsystemVersion
<<
16
)
|
nt
->
OptionalHeader
.
MinorSubsystemVersion
);
if
((
p
nt
=
RtlImageNtHeader
(
NtCurrentTeb
()
->
Peb
->
ImageBaseAddress
)))
return
((
p
nt
->
OptionalHeader
.
MajorSubsystemVersion
<<
16
)
|
p
nt
->
OptionalHeader
.
MinorSubsystemVersion
);
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment