Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
3b4a6a1
)
VPP-1440: clean up coverity warnings
24/15124/3
author
Dave Barach
<dave@barachs.net>
Wed, 3 Oct 2018 15:45:06 +0000
(11:45 -0400)
committer
Ole Trøan
<otroan@employees.org>
Wed, 3 Oct 2018 17:10:44 +0000
(17:10 +0000)
Change-Id: Ie315d4e83c0575d82aee0369ef50e8dd2dad6a2a
Signed-off-by: Dave Barach <dave@barachs.net>
src/plugins/memif/memif.c
patch
|
blob
|
history
diff --git
a/src/plugins/memif/memif.c
b/src/plugins/memif/memif.c
index
42325df
..
c01b8dc
100644
(file)
--- a/
src/plugins/memif/memif.c
+++ b/
src/plugins/memif/memif.c
@@
-682,8
+682,8
@@
memif_socket_filename_add_del (u8 is_add, u32 sock_id, u8 * sock_filename)
vec_add1 (dir, '\0');
}
- if (((
stat (dir, &file_stat) == -1) || (!S_ISDIR (file_stat.st_mode))
)
- && (idx != 0))
+ if (((
dir == 0) || (stat (dir, &file_stat) == -1
)
+
|| (!S_ISDIR (file_stat.st_mode)))
&& (idx != 0))
{
vec_free (dir);
return VNET_API_ERROR_INVALID_ARGUMENT;