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
481ff775
Commit
481ff775
authored
Nov 05, 2014
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Simplify check for an empty string (PVS-Studio).
parent
e2eb760f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
8 deletions
+8
-8
dialog.c
dlls/msi/dialog.c
+1
-1
script.c
dlls/msi/script.c
+1
-1
action.c
dlls/msi/tests/action.c
+1
-1
db.c
dlls/msi/tests/db.c
+2
-2
package.c
dlls/msi/tests/package.c
+2
-2
source.c
dlls/msi/tests/source.c
+1
-1
No files found.
dlls/msi/dialog.c
View file @
481ff775
...
...
@@ -2171,7 +2171,7 @@ static void msi_dialog_update_pathedit( msi_dialog *dialog, msi_control *control
/* FIXME: test when this should fail */
static
BOOL
msi_dialog_verify_path
(
LPWSTR
path
)
{
if
(
!
lstrlenW
(
path
)
)
if
(
!
path
[
0
]
)
return
FALSE
;
if
(
PathIsRelativeW
(
path
)
)
...
...
dlls/msi/script.c
View file @
481ff775
...
...
@@ -356,7 +356,7 @@ DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function
if
(
FAILED
(
hr
))
goto
done
;
/* Call a function if necessary through the IDispatch interface */
if
(
function
!=
NULL
&&
strlenW
(
function
)
>
0
)
{
if
(
function
&&
function
[
0
]
)
{
TRACE
(
"Calling function %s
\n
"
,
debugstr_w
(
function
));
hr
=
IActiveScript_GetScriptDispatch
(
pActiveScript
,
NULL
,
&
pDispatch
);
...
...
dlls/msi/tests/action.c
View file @
481ff775
...
...
@@ -2715,7 +2715,7 @@ static void check_reg_str(HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase
}
if
(
!
expected
)
ok_
(
__FILE__
,
line
)(
lstrlenA
(
val
)
==
0
,
"Expected empty string, got %s
\n
"
,
val
);
ok_
(
__FILE__
,
line
)(
!
val
[
0
]
,
"Expected empty string, got %s
\n
"
,
val
);
else
{
if
(
bcase
)
...
...
dlls/msi/tests/db.c
View file @
481ff775
...
...
@@ -4534,7 +4534,7 @@ static void test_update(void)
size
=
MAX_PATH
;
r
=
MsiRecordGetStringA
(
rec
,
1
,
result
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrlenA
(
result
)
,
"Expected an empty string, got %s
\n
"
,
result
);
ok
(
!
result
[
0
]
,
"Expected an empty string, got %s
\n
"
,
result
);
MsiCloseHandle
(
rec
);
...
...
@@ -4580,7 +4580,7 @@ static void test_update(void)
size
=
MAX_PATH
;
r
=
MsiRecordGetStringA
(
rec
,
1
,
result
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrlenA
(
result
)
,
"Expected an empty string, got %s
\n
"
,
result
);
ok
(
!
result
[
0
]
,
"Expected an empty string, got %s
\n
"
,
result
);
MsiCloseHandle
(
rec
);
...
...
dlls/msi/tests/package.c
View file @
481ff775
...
...
@@ -2194,7 +2194,7 @@ static void test_props(void)
sz
=
6
;
r
=
MsiGetPropertyA
(
hpkg
,
"property"
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
strlen
(
buffer
)
,
"Expected empty string, got %s
\n
"
,
buffer
);
ok
(
!
buffer
[
0
]
,
"Expected empty string, got %s
\n
"
,
buffer
);
MsiCloseHandle
(
hpkg
);
DeleteFileA
(
msifile
);
...
...
@@ -2347,7 +2347,7 @@ static void test_property_table(void)
lstrcpyA
(
buffer
,
"aaa"
);
r
=
MsiGetPropertyA
(
hpkg
,
"dantes"
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
lstrlenA
(
buffer
)
==
0
,
"Expected empty string, got %s
\n
"
,
buffer
);
ok
(
!
buffer
[
0
]
,
"Expected empty string, got %s
\n
"
,
buffer
);
r
=
MsiSetPropertyA
(
hpkg
,
"dantes"
,
"mercedes"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
dlls/msi/tests/source.c
View file @
481ff775
...
...
@@ -176,7 +176,7 @@ static void check_reg_str(HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase
}
if
(
!
expected
)
ok_
(
__FILE__
,
line
)(
lstrlenA
(
val
)
==
0
,
"Expected empty string, got %s
\n
"
,
val
);
ok_
(
__FILE__
,
line
)(
!
val
[
0
]
,
"Expected empty string, got %s
\n
"
,
val
);
else
{
if
(
bcase
)
...
...
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