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
8d24dd49
Commit
8d24dd49
authored
Aug 08, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Avoid FALSE:TRUE conditional expressions.
parent
915e12e5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
15 deletions
+7
-15
path.c
dlls/shlwapi/path.c
+2
-2
reg.c
dlls/shlwapi/reg.c
+4
-12
thread.c
dlls/shlwapi/thread.c
+1
-1
No files found.
dlls/shlwapi/path.c
View file @
8d24dd49
...
...
@@ -1714,7 +1714,7 @@ BOOL WINAPI PathFileExistsA(LPCSTR lpszPath)
iPrevErrMode
=
SetErrorMode
(
SEM_FAILCRITICALERRORS
);
dwAttr
=
GetFileAttributesA
(
lpszPath
);
SetErrorMode
(
iPrevErrMode
);
return
dwAttr
==
INVALID_FILE_ATTRIBUTES
?
FALSE
:
TRUE
;
return
dwAttr
!=
INVALID_FILE_ATTRIBUTES
;
}
/*************************************************************************
...
...
@@ -1735,7 +1735,7 @@ BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
iPrevErrMode
=
SetErrorMode
(
SEM_FAILCRITICALERRORS
);
dwAttr
=
GetFileAttributesW
(
lpszPath
);
SetErrorMode
(
iPrevErrMode
);
return
dwAttr
==
INVALID_FILE_ATTRIBUTES
?
FALSE
:
TRUE
;
return
dwAttr
!=
INVALID_FILE_ATTRIBUTES
;
}
/*************************************************************************
...
...
dlls/shlwapi/reg.c
View file @
8d24dd49
...
...
@@ -1890,17 +1890,14 @@ DWORD WINAPI SHGetValueGoodBootW(HKEY hkey, LPCWSTR pSubKey, LPCWSTR pValue,
*/
BOOL
WINAPI
RegisterMIMETypeForExtensionA
(
LPCSTR
lpszSubKey
,
LPCSTR
lpszValue
)
{
DWORD
dwRet
;
if
(
!
lpszValue
)
{
WARN
(
"Invalid lpszValue would crash under Win32!
\n
"
);
return
FALSE
;
}
dwRet
=
SHSetValueA
(
HKEY_CLASSES_ROOT
,
lpszSubKey
,
lpszContentTypeA
,
return
!
SHSetValueA
(
HKEY_CLASSES_ROOT
,
lpszSubKey
,
lpszContentTypeA
,
REG_SZ
,
lpszValue
,
strlen
(
lpszValue
));
return
dwRet
?
FALSE
:
TRUE
;
}
/*************************************************************************
...
...
@@ -1910,17 +1907,14 @@ BOOL WINAPI RegisterMIMETypeForExtensionA(LPCSTR lpszSubKey, LPCSTR lpszValue)
*/
BOOL
WINAPI
RegisterMIMETypeForExtensionW
(
LPCWSTR
lpszSubKey
,
LPCWSTR
lpszValue
)
{
DWORD
dwRet
;
if
(
!
lpszValue
)
{
WARN
(
"Invalid lpszValue would crash under Win32!
\n
"
);
return
FALSE
;
}
dwRet
=
SHSetValueW
(
HKEY_CLASSES_ROOT
,
lpszSubKey
,
lpszContentTypeW
,
return
!
SHSetValueW
(
HKEY_CLASSES_ROOT
,
lpszSubKey
,
lpszContentTypeW
,
REG_SZ
,
lpszValue
,
strlenW
(
lpszValue
));
return
dwRet
?
FALSE
:
TRUE
;
}
/*************************************************************************
...
...
@@ -1937,8 +1931,7 @@ BOOL WINAPI RegisterMIMETypeForExtensionW(LPCWSTR lpszSubKey, LPCWSTR lpszValue)
*/
BOOL
WINAPI
UnregisterMIMETypeForExtensionA
(
LPCSTR
lpszSubKey
)
{
HRESULT
ret
=
SHDeleteValueA
(
HKEY_CLASSES_ROOT
,
lpszSubKey
,
lpszContentTypeA
);
return
ret
?
FALSE
:
TRUE
;
return
!
SHDeleteValueA
(
HKEY_CLASSES_ROOT
,
lpszSubKey
,
lpszContentTypeA
);
}
/*************************************************************************
...
...
@@ -1948,8 +1941,7 @@ BOOL WINAPI UnregisterMIMETypeForExtensionA(LPCSTR lpszSubKey)
*/
BOOL
WINAPI
UnregisterMIMETypeForExtensionW
(
LPCWSTR
lpszSubKey
)
{
HRESULT
ret
=
SHDeleteValueW
(
HKEY_CLASSES_ROOT
,
lpszSubKey
,
lpszContentTypeW
);
return
ret
?
FALSE
:
TRUE
;
return
!
SHDeleteValueW
(
HKEY_CLASSES_ROOT
,
lpszSubKey
,
lpszContentTypeW
);
}
/*************************************************************************
...
...
dlls/shlwapi/thread.c
View file @
8d24dd49
...
...
@@ -365,7 +365,7 @@ BOOL WINAPI SHCreateThread(LPTHREAD_START_ROUTINE pfnThreadProc, VOID *pData,
ti
.
pfnThreadProc
=
pfnThreadProc
;
ti
.
pfnCallback
=
pfnCallback
;
ti
.
pData
=
pData
;
ti
.
bInitCom
=
dwFlags
&
CTF_COINIT
?
TRUE
:
FALSE
;
ti
.
bInitCom
=
(
dwFlags
&
CTF_COINIT
)
!=
0
;
ti
.
hEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
/* Hold references to the current thread and IE process, if desired */
...
...
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