Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
811ae03a
Commit
811ae03a
authored
Oct 20, 2011
by
Marcus Meissner
Committed by
Alexandre Julliard
Oct 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Avoid shadowing "de" variable.
parent
d4ec0a19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
directory.c
dlls/ntdll/directory.c
+13
-13
No files found.
dlls/ntdll/directory.c
View file @
811ae03a
...
...
@@ -2134,43 +2134,43 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i
int
fd
=
open
(
unix_name
,
O_RDONLY
|
O_DIRECTORY
);
if
(
fd
!=
-
1
)
{
KERNEL_DIRENT
*
de
;
KERNEL_DIRENT
*
k
de
;
RtlEnterCriticalSection
(
&
dir_section
);
if
((
de
=
start_vfat_ioctl
(
fd
)))
if
((
k
de
=
start_vfat_ioctl
(
fd
)))
{
unix_name
[
pos
-
1
]
=
'/'
;
while
(
de
[
0
].
d_reclen
)
while
(
k
de
[
0
].
d_reclen
)
{
/* make sure names are null-terminated to work around an x86-64 kernel bug */
size_t
len
=
min
(
de
[
0
].
d_reclen
,
sizeof
(
de
[
0
].
d_name
)
-
1
);
de
[
0
].
d_name
[
len
]
=
0
;
len
=
min
(
de
[
1
].
d_reclen
,
sizeof
(
de
[
1
].
d_name
)
-
1
);
de
[
1
].
d_name
[
len
]
=
0
;
size_t
len
=
min
(
kde
[
0
].
d_reclen
,
sizeof
(
k
de
[
0
].
d_name
)
-
1
);
k
de
[
0
].
d_name
[
len
]
=
0
;
len
=
min
(
kde
[
1
].
d_reclen
,
sizeof
(
k
de
[
1
].
d_name
)
-
1
);
k
de
[
1
].
d_name
[
len
]
=
0
;
if
(
de
[
1
].
d_name
[
0
])
if
(
k
de
[
1
].
d_name
[
0
])
{
ret
=
ntdll_umbstowcs
(
0
,
de
[
1
].
d_name
,
strlen
(
de
[
1
].
d_name
),
ret
=
ntdll_umbstowcs
(
0
,
kde
[
1
].
d_name
,
strlen
(
k
de
[
1
].
d_name
),
buffer
,
MAX_DIR_ENTRY_LEN
);
if
(
ret
==
length
&&
!
memicmpW
(
buffer
,
name
,
length
))
{
strcpy
(
unix_name
+
pos
,
de
[
1
].
d_name
);
strcpy
(
unix_name
+
pos
,
k
de
[
1
].
d_name
);
RtlLeaveCriticalSection
(
&
dir_section
);
close
(
fd
);
goto
success
;
}
}
ret
=
ntdll_umbstowcs
(
0
,
de
[
0
].
d_name
,
strlen
(
de
[
0
].
d_name
),
ret
=
ntdll_umbstowcs
(
0
,
kde
[
0
].
d_name
,
strlen
(
k
de
[
0
].
d_name
),
buffer
,
MAX_DIR_ENTRY_LEN
);
if
(
ret
==
length
&&
!
memicmpW
(
buffer
,
name
,
length
))
{
strcpy
(
unix_name
+
pos
,
de
[
1
].
d_name
[
0
]
?
de
[
1
].
d_name
:
de
[
0
].
d_name
);
kde
[
1
].
d_name
[
0
]
?
kde
[
1
].
d_name
:
k
de
[
0
].
d_name
);
RtlLeaveCriticalSection
(
&
dir_section
);
close
(
fd
);
goto
success
;
}
if
(
ioctl
(
fd
,
VFAT_IOCTL_READDIR_BOTH
,
(
long
)
de
)
==
-
1
)
if
(
ioctl
(
fd
,
VFAT_IOCTL_READDIR_BOTH
,
(
long
)
k
de
)
==
-
1
)
{
RtlLeaveCriticalSection
(
&
dir_section
);
close
(
fd
);
...
...
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