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
5fd1409c
Commit
5fd1409c
authored
Jun 16, 2010
by
Alexander Scott-Johns
Committed by
Alexandre Julliard
Jun 17, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt/tests: Rename a variable.
parent
2649f769
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
misc.c
dlls/msvcrt/tests/misc.c
+10
-10
No files found.
dlls/msvcrt/tests/misc.c
View file @
5fd1409c
...
...
@@ -23,7 +23,7 @@
#include "msvcrt.h"
static
int
(
__cdecl
*
prand_s
)(
unsigned
int
*
);
static
int
(
__cdecl
*
memcpy_s
)(
void
*
,
MSVCRT_size_t
,
void
*
,
MSVCRT_size_t
);
static
int
(
__cdecl
*
p
memcpy_s
)(
void
*
,
MSVCRT_size_t
,
void
*
,
MSVCRT_size_t
);
static
int
(
__cdecl
*
pI10_OUTPUT
)(
long
double
,
int
,
int
,
void
*
);
static
void
init
(
void
)
...
...
@@ -31,7 +31,7 @@ static void init(void)
HMODULE
hmod
=
GetModuleHandleA
(
"msvcrt.dll"
);
prand_s
=
(
void
*
)
GetProcAddress
(
hmod
,
"rand_s"
);
memcpy_s
=
(
void
*
)
GetProcAddress
(
hmod
,
"memcpy_s"
);
p
memcpy_s
=
(
void
*
)
GetProcAddress
(
hmod
,
"memcpy_s"
);
pI10_OUTPUT
=
(
void
*
)
GetProcAddress
(
hmod
,
"$I10_OUTPUT"
);
}
...
...
@@ -61,46 +61,46 @@ static void test_memcpy_s(void)
static
char
dest
[
32
];
int
ret
;
if
(
!
memcpy_s
)
if
(
!
p
memcpy_s
)
{
win_skip
(
"memcpy_s i
n
not available
\n
"
);
win_skip
(
"memcpy_s i
s
not available
\n
"
);
return
;
}
errno
=
0xdeadbeef
;
ret
=
memcpy_s
(
NULL
,
0
,
NULL
,
0
);
ret
=
p
memcpy_s
(
NULL
,
0
,
NULL
,
0
);
ok
(
ret
==
0
,
"ret = %x
\n
"
,
ret
);
ok
(
errno
==
0xdeadbeef
,
"errno = %x
\n
"
,
errno
);
errno
=
0xdeadbeef
;
dest
[
0
]
=
'x'
;
ret
=
memcpy_s
(
dest
,
10
,
NULL
,
0
);
ret
=
p
memcpy_s
(
dest
,
10
,
NULL
,
0
);
ok
(
ret
==
0
,
"ret = %x
\n
"
,
ret
);
ok
(
errno
==
0xdeadbeef
,
"errno = %x
\n
"
,
errno
);
ok
(
dest
[
0
]
==
'x'
,
"dest[0] !=
\'
x
\'\n
"
);
errno
=
0xdeadbeef
;
ret
=
memcpy_s
(
NULL
,
10
,
data
,
10
);
ret
=
p
memcpy_s
(
NULL
,
10
,
data
,
10
);
ok
(
ret
==
EINVAL
,
"ret = %x
\n
"
,
ret
);
ok
(
errno
==
EINVAL
,
"errno = %x
\n
"
,
errno
);
errno
=
0xdeadbeef
;
dest
[
7
]
=
'x'
;
ret
=
memcpy_s
(
dest
,
10
,
data
,
5
);
ret
=
p
memcpy_s
(
dest
,
10
,
data
,
5
);
ok
(
ret
==
0
,
"ret = %x
\n
"
,
ret
);
ok
(
errno
==
0xdeadbeef
,
"errno = %x
\n
"
,
errno
);
ok
(
memcmp
(
dest
,
data
,
10
),
"All data copied
\n
"
);
ok
(
!
memcmp
(
dest
,
data
,
5
),
"First five bytes are different
\n
"
);
errno
=
0xdeadbeef
;
ret
=
memcpy_s
(
data
,
10
,
data
,
10
);
ret
=
p
memcpy_s
(
data
,
10
,
data
,
10
);
ok
(
ret
==
0
,
"ret = %x
\n
"
,
ret
);
ok
(
errno
==
0xdeadbeef
,
"errno = %x
\n
"
,
errno
);
ok
(
!
memcmp
(
dest
,
data
,
5
),
"data was destroyed during overwritting
\n
"
);
errno
=
0xdeadbeef
;
dest
[
0
]
=
'x'
;
ret
=
memcpy_s
(
dest
,
5
,
data
,
10
);
ret
=
p
memcpy_s
(
dest
,
5
,
data
,
10
);
ok
(
ret
==
ERANGE
,
"ret = %x
\n
"
,
ret
);
ok
(
errno
==
ERANGE
,
"errno = %x
\n
"
,
errno
);
ok
(
dest
[
0
]
==
'\0'
,
"dest[0] !=
\'\\
0
\'\n
"
);
...
...
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