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
5d43ef68
Commit
5d43ef68
authored
Nov 07, 2014
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Simplify check for empty string (PVS-Studio).
parent
0311b980
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
shellord.c
dlls/shell32/shellord.c
+1
-1
ebrowser.c
dlls/shell32/tests/ebrowser.c
+1
-1
shlfolder.c
dlls/shell32/tests/shlfolder.c
+7
-7
No files found.
dlls/shell32/shellord.c
View file @
5d43ef68
...
@@ -947,7 +947,7 @@ void WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)
...
@@ -947,7 +947,7 @@ void WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)
/* buffer size looks good */
/* buffer size looks good */
ptr
+=
12
;
/* get to string */
ptr
+=
12
;
/* get to string */
len
=
bufused
-
(
ptr
-
buffer
);
/* get length of buf remaining */
len
=
bufused
-
(
ptr
-
buffer
);
/* get length of buf remaining */
if
((
lstrlenA
(
ptr
)
>
0
)
&&
(
lstrlenA
(
ptr
)
<=
len
-
1
))
{
if
(
ptr
[
0
]
&&
(
lstrlenA
(
ptr
)
<=
len
-
1
))
{
/* appears to be good string */
/* appears to be good string */
lstrcpyA
(
old_lnk_name
,
link_dir
);
lstrcpyA
(
old_lnk_name
,
link_dir
);
PathAppendA
(
old_lnk_name
,
ptr
);
PathAppendA
(
old_lnk_name
,
ptr
);
...
...
dlls/shell32/tests/ebrowser.c
View file @
5d43ef68
...
@@ -1381,7 +1381,7 @@ static void test_navigation(void)
...
@@ -1381,7 +1381,7 @@ static void test_navigation(void)
ok
(
pSHCreateShellItem
!=
NULL
,
"pSHCreateShellItem unexpectedly missing.
\n
"
);
ok
(
pSHCreateShellItem
!=
NULL
,
"pSHCreateShellItem unexpectedly missing.
\n
"
);
GetCurrentDirectoryW
(
MAX_PATH
,
current_path
);
GetCurrentDirectoryW
(
MAX_PATH
,
current_path
);
if
(
!
lstrlenW
(
current_path
)
)
if
(
!
current_path
[
0
]
)
{
{
skip
(
"Failed to create test-directory.
\n
"
);
skip
(
"Failed to create test-directory.
\n
"
);
return
;
return
;
...
...
dlls/shell32/tests/shlfolder.c
View file @
5d43ef68
...
@@ -81,7 +81,7 @@ static WCHAR *make_wstr(const char *str)
...
@@ -81,7 +81,7 @@ static WCHAR *make_wstr(const char *str)
WCHAR
*
ret
;
WCHAR
*
ret
;
int
len
;
int
len
;
if
(
!
str
||
strlen
(
str
)
==
0
)
if
(
!
str
||
!
str
[
0
]
)
return
NULL
;
return
NULL
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
);
...
@@ -2203,7 +2203,7 @@ static void test_SHCreateShellItem(void)
...
@@ -2203,7 +2203,7 @@ static void test_SHCreateShellItem(void)
return
;
return
;
}
}
if
(
!
lstrlenA
(
curdirA
)
)
if
(
!
curdirA
[
0
]
)
{
{
win_skip
(
"GetCurrentDirectoryA returned empty string, skipping test_SHCreateShellItem
\n
"
);
win_skip
(
"GetCurrentDirectoryA returned empty string, skipping test_SHCreateShellItem
\n
"
);
return
;
return
;
...
@@ -2780,7 +2780,7 @@ static void test_ShellItemCompare(void)
...
@@ -2780,7 +2780,7 @@ static void test_ShellItemCompare(void)
}
}
GetCurrentDirectoryW
(
MAX_PATH
,
curdirW
);
GetCurrentDirectoryW
(
MAX_PATH
,
curdirW
);
if
(
!
lstrlenW
(
curdirW
)
)
if
(
!
curdirW
[
0
]
)
{
{
skip
(
"Failed to get current directory, skipping.
\n
"
);
skip
(
"Failed to get current directory, skipping.
\n
"
);
return
;
return
;
...
@@ -4387,7 +4387,7 @@ static void test_GetUIObject(void)
...
@@ -4387,7 +4387,7 @@ static void test_GetUIObject(void)
}
}
GetCurrentDirectoryW
(
MAX_PATH
,
path
);
GetCurrentDirectoryW
(
MAX_PATH
,
path
);
if
(
!
lstrlenW
(
path
)
)
if
(
!
path
[
0
]
)
{
{
skip
(
"GetCurrentDirectoryW returned an empty string.
\n
"
);
skip
(
"GetCurrentDirectoryW returned an empty string.
\n
"
);
return
;
return
;
...
@@ -4989,8 +4989,8 @@ static void test_SHChangeNotify(BOOL test_new_delivery)
...
@@ -4989,8 +4989,8 @@ static void test_SHChangeNotify(BOOL test_new_delivery)
exp_data
->
missing_events
=
exp_data
->
notify_count
;
exp_data
->
missing_events
=
exp_data
->
notify_count
;
SHChangeNotify
(
exp_data
->
signal
,
SHCNF_PATHA
|
SHCNF_FLUSH
,
SHChangeNotify
(
exp_data
->
signal
,
SHCNF_PATHA
|
SHCNF_FLUSH
,
strlen
(
exp_data
->
path_1
)
>
0
?
exp_data
->
path_1
:
NULL
,
exp_data
->
path_1
[
0
]
?
exp_data
->
path_1
:
NULL
,
strlen
(
exp_data
->
path_2
)
>
0
?
exp_data
->
path_2
:
NULL
);
exp_data
->
path_2
[
0
]
?
exp_data
->
path_2
:
NULL
);
do_events
();
do_events
();
ok
(
exp_data
->
missing_events
==
0
,
"%s: Expected wndproc to be called
\n
"
,
exp_data
->
id
);
ok
(
exp_data
->
missing_events
==
0
,
"%s: Expected wndproc to be called
\n
"
,
exp_data
->
id
);
...
@@ -5045,7 +5045,7 @@ static void test_SHCreateDefaultContextMenu(void)
...
@@ -5045,7 +5045,7 @@ static void test_SHCreateDefaultContextMenu(void)
}
}
GetCurrentDirectoryW
(
MAX_PATH
,
path
);
GetCurrentDirectoryW
(
MAX_PATH
,
path
);
if
(
!
lstrlenW
(
path
)
)
if
(
!
path
[
0
]
)
{
{
skip
(
"GetCurrentDirectoryW returned an empty string.
\n
"
);
skip
(
"GetCurrentDirectoryW returned an empty string.
\n
"
);
return
;
return
;
...
...
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