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
0227b8cb
Commit
0227b8cb
authored
Aug 03, 2006
by
Benjamin Arai
Committed by
Alexandre Julliard
Aug 04, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Removes extra string allocation for varformat:VarMonthName.
parent
f5cc0f7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
varformat.c
dlls/oleaut32/varformat.c
+4
-9
No files found.
dlls/oleaut32/varformat.c
View file @
0227b8cb
...
...
@@ -2471,7 +2471,6 @@ HRESULT WINAPI VarMonthName(INT iMonth, INT fAbbrev, ULONG dwFlags, BSTR *pbstrO
{
DWORD
localeValue
;
INT
size
;
WCHAR
*
str
;
if
((
iMonth
<
1
)
||
(
iMonth
>
12
))
return
E_INVALIDARG
;
...
...
@@ -2489,18 +2488,14 @@ HRESULT WINAPI VarMonthName(INT iMonth, INT fAbbrev, ULONG dwFlags, BSTR *pbstrO
ERR
(
"GetLocaleInfo 0x%lx failed.
\n
"
,
localeValue
);
return
HRESULT_FROM_WIN32
(
GetLastError
());
}
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
size
);
if
(
!
str
)
*
pbstrOut
=
SysAllocStringLen
(
NULL
,
size
-
1
);
if
(
!
*
pbstrOut
)
return
E_OUTOFMEMORY
;
size
=
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
localeValue
,
str
,
size
);
size
=
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
localeValue
,
*
pbstrOut
,
size
);
if
(
!
size
)
{
ERR
(
"GetLocaleInfo of 0x%lx failed in 2nd stage?!
\n
"
,
localeValue
);
HeapFree
(
GetProcessHeap
(),
0
,
str
);
SysFreeString
(
*
pbstrOut
);
return
HRESULT_FROM_WIN32
(
GetLastError
());
}
*
pbstrOut
=
SysAllocString
(
str
);
HeapFree
(
GetProcessHeap
(),
0
,
str
);
if
(
!*
pbstrOut
)
return
E_OUTOFMEMORY
;
return
S_OK
;
}
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