mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +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);
|
||||
|
||||
/* skip past dev */
|
||||
p = strchr(path + 1, '/');
|
||||
if (!(p = strchr(path + 1, '/')))
|
||||
return -EINVAL;
|
||||
|
||||
/* skip past slashes */
|
||||
while (*p == '/')
|
||||
|
Loading…
Reference in New Issue
Block a user