mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
cov: check strchr for NULL
Although unlikely, ensuring coverity we not use NULL.
This commit is contained in:
parent
377e326156
commit
7bd55f8c15
@ -801,7 +801,8 @@ int lm_refresh_lv_start_dlm(struct action *act)
|
|||||||
strncpy(path, act->path, PATH_MAX-1);
|
strncpy(path, act->path, PATH_MAX-1);
|
||||||
|
|
||||||
/* skip past dev */
|
/* skip past dev */
|
||||||
p = strchr(path + 1, '/');
|
if (!(p = strchr(path + 1, '/')))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
/* skip past slashes */
|
/* skip past slashes */
|
||||||
while (*p == '/')
|
while (*p == '/')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user