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
9dd75ea0
Commit
9dd75ea0
authored
Aug 17, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Aug 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Fix testing of HRESULT types with not operator instead of comparing against S_OK.
This makes it more obvious what the code is doing.
parent
03a25b48
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
ordinal.c
dlls/shlwapi/ordinal.c
+3
-3
string.c
dlls/shlwapi/string.c
+5
-3
url.c
dlls/shlwapi/url.c
+1
-1
No files found.
dlls/shlwapi/ordinal.c
View file @
9dd75ea0
...
...
@@ -422,11 +422,11 @@ HRESULT WINAPI RegisterDefaultAcceptHeaders(LPBC lpBC, IUnknown *lpUnknown)
pIEnumFormatEtc
=
NULL
;
hRet
=
IUnknown_QueryInterface
(
pIUnknown
,
&
IID_IEnumFORMATETC
,
(
PVOID
)
&
pIEnumFormatEtc
);
if
(
!
hRet
&&
pIEnumFormatEtc
)
if
(
hRet
==
S_OK
&&
pIEnumFormatEtc
)
{
/* Clone and register the enumerator */
hRet
=
IEnumFORMATETC_Clone
(
pIEnumFormatEtc
,
&
pClone
);
if
(
!
hRet
&&
pClone
)
if
(
hRet
==
S_OK
&&
pClone
)
{
RegisterFormatEnumerator
(
lpBC
,
pClone
,
0
);
...
...
@@ -1462,7 +1462,7 @@ HRESULT WINAPI IUnknown_QueryService(IUnknown* lpUnknown, REFGUID sid, REFIID ri
hRet
=
IUnknown_QueryInterface
(
lpUnknown
,
&
IID_IServiceProvider
,
(
LPVOID
*
)
&
pService
);
if
(
!
hRet
&&
pService
)
if
(
hRet
==
S_OK
&&
pService
)
{
TRACE
(
"QueryInterface returned (IServiceProvider*)%p
\n
"
,
pService
);
...
...
dlls/shlwapi/string.c
View file @
9dd75ea0
...
...
@@ -2511,8 +2511,9 @@ INT WINAPI SHUnicodeToAnsiCP(UINT CodePage, LPCWSTR lpSrcStr, LPSTR lpDstStr,
DWORD
dwMode
=
0
;
INT
nWideCharCount
=
len
-
1
;
if
(
!
ConvertINetUnicodeToMultiByte
(
&
dwMode
,
CodePage
,
lpSrcStr
,
&
nWideCharCount
,
lpDstStr
,
lpiLen
))
if
(
ConvertINetUnicodeToMultiByte
(
&
dwMode
,
CodePage
,
lpSrcStr
,
&
nWideCharCount
,
lpDstStr
,
lpiLen
)
==
S_OK
)
return
0
;
if
(
nWideCharCount
<
len
-
1
)
...
...
@@ -2523,7 +2524,8 @@ INT WINAPI SHUnicodeToAnsiCP(UINT CodePage, LPCWSTR lpSrcStr, LPSTR lpDstStr,
*
lpiLen
=
0
;
if
(
ConvertINetUnicodeToMultiByte
(
&
dwMode
,
CodePage
,
lpSrcStr
,
&
len
,
mem
,
lpiLen
))
if
(
ConvertINetUnicodeToMultiByte
(
&
dwMode
,
CodePage
,
lpSrcStr
,
&
len
,
mem
,
lpiLen
)
!=
S_OK
)
{
SHTruncateString
(
mem
,
*
lpiLen
);
lstrcpynA
(
lpDstStr
,
mem
,
*
lpiLen
+
1
);
...
...
dlls/shlwapi/url.c
View file @
9dd75ea0
...
...
@@ -2077,7 +2077,7 @@ HRESULT WINAPI UrlGetPartW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut,
debugstr_w
(
pszIn
),
pszOut
,
pcchOut
,
*
pcchOut
,
dwPart
,
dwFlags
);
ret
=
URL_ParseUrl
(
pszIn
,
&
pl
);
if
(
!
ret
)
{
if
(
ret
==
S_OK
)
{
schaddr
=
pl
.
pScheme
;
schsize
=
pl
.
szScheme
;
...
...
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