1
0
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:
Zdenek Kabelac 2021-09-21 18:24:30 +02:00
parent 377e326156
commit 7bd55f8c15

View File

@ -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 == '/')