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
a470afca
Commit
a470afca
authored
Feb 27, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix incorrect uses of msvcrt_set_errno.
parent
1bbac341
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
heap.c
dlls/msvcrt/heap.c
+6
-6
mbcs.c
dlls/msvcrt/mbcs.c
+1
-1
No files found.
dlls/msvcrt/heap.c
View file @
a470afca
...
...
@@ -280,7 +280,7 @@ void* CDECL MSVCRT_malloc(MSVCRT_size_t size)
{
void
*
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
ret
)
msvcrt_set_errno
(
MSVCRT_ENOMEM
)
;
*
MSVCRT__errno
()
=
MSVCRT_ENOMEM
;
return
ret
;
}
...
...
@@ -348,14 +348,14 @@ void * CDECL _aligned_offset_malloc(MSVCRT_size_t size, MSVCRT_size_t alignment,
/* alignment must be a power of 2 */
if
((
alignment
&
(
alignment
-
1
))
!=
0
)
{
msvcrt_set_errno
(
EINVAL
)
;
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
NULL
;
}
/* offset must be less than size */
if
(
offset
>=
size
)
{
msvcrt_set_errno
(
EINVAL
)
;
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
NULL
;
}
...
...
@@ -405,14 +405,14 @@ void * CDECL _aligned_offset_realloc(void *memblock, MSVCRT_size_t size,
/* alignment must be a power of 2 */
if
((
alignment
&
(
alignment
-
1
))
!=
0
)
{
msvcrt_set_errno
(
EINVAL
)
;
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
NULL
;
}
/* offset must be less than size */
if
(
offset
>=
size
)
{
msvcrt_set_errno
(
EINVAL
)
;
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
NULL
;
}
...
...
@@ -430,7 +430,7 @@ void * CDECL _aligned_offset_realloc(void *memblock, MSVCRT_size_t size,
saved
=
SAVED_PTR
(
memblock
);
if
(
memblock
!=
ALIGN_PTR
(
*
saved
,
alignment
,
offset
))
{
msvcrt_set_errno
(
EINVAL
)
;
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
NULL
;
}
...
...
dlls/msvcrt/mbcs.c
View file @
a470afca
...
...
@@ -191,7 +191,7 @@ int CDECL _setmbcp(int cp)
if
(
!
GetCPInfo
(
newcp
,
&
cpi
))
{
WARN
(
"Codepage %d not found
\n
"
,
newcp
);
msvcrt_set_errno
(
MSVCRT_EINVAL
)
;
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
-
1
;
}
...
...
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