vpp-189 Clean up more coverity warnings
Time to make the donuts
Change-Id: I528937800f7daefce19723dda0216e58d857942c
Signed-off-by: Dave Barach <dave@barachs.net>
diff --git a/vppinfra/vppinfra/elf_clib.c b/vppinfra/vppinfra/elf_clib.c
index f3d3b32..8c70548 100644
--- a/vppinfra/vppinfra/elf_clib.c
+++ b/vppinfra/vppinfra/elf_clib.c
@@ -82,6 +82,9 @@
if (file[0] == '.' || file[0] == '/')
return file;
+ if (getenv("PATH") == 0)
+ return file;
+
ps.path = split_string (getenv ("PATH"), ':');
for (i = 0; i < vec_len (ps.path); i++)
@@ -231,7 +234,10 @@
name = path_search (cem->exec_path);
if (! name)
- clib_error ("failed to find %s on PATH", cem->exec_path);
+ {
+ clib_error ("failed to find %s on PATH", cem->exec_path);
+ return 0;
+ }
addr = 0;
}