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
03fe2d0d
Commit
03fe2d0d
authored
Dec 22, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Use RtlRandom instead of the non-portable rand_r.
parent
8e1b59cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
trash.c
dlls/shell32/trash.c
+2
-2
No files found.
dlls/shell32/trash.c
View file @
03fe2d0d
...
...
@@ -215,7 +215,7 @@ static char *create_trashinfo(const char *info_dir, const char *file_path)
{
const
char
*
base_name
;
char
*
filename_buffer
;
unsigned
int
seed
=
(
unsigned
int
)
time
(
NULL
);
ULONG
seed
=
GetTickCount
(
);
int
i
;
errno
=
ENOMEM
;
/* out-of-memory is the only case when errno isn't set */
...
...
@@ -240,7 +240,7 @@ static char *create_trashinfo(const char *info_dir, const char *file_path)
for
(
i
=
0
;
i
<
1000
;
i
++
)
{
sprintf
(
filename_buffer
,
"%s-%08x"
,
base_name
,
rand_r
(
&
seed
));
sprintf
(
filename_buffer
,
"%s-%08x"
,
base_name
,
RtlRandom
(
&
seed
));
if
(
try_create_trashinfo_file
(
info_dir
,
filename_buffer
,
file_path
))
return
filename_buffer
;
}
...
...
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