summaryrefslogtreecommitdiffstats
path: root/sbin/geom/class/concat/geom_concat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/geom/class/concat/geom_concat.c')
-rw-r--r--sbin/geom/class/concat/geom_concat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/geom/class/concat/geom_concat.c b/sbin/geom/class/concat/geom_concat.c
index 80fe26b..d4f3645 100644
--- a/sbin/geom/class/concat/geom_concat.c
+++ b/sbin/geom/class/concat/geom_concat.c
@@ -153,8 +153,8 @@ concat_label(struct gctl_req *req)
if (!hardcode)
bzero(md.md_provider, sizeof(md.md_provider));
else {
- if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0)
- name += strlen(_PATH_DEV);
+ if (strncmp(name, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
+ name += sizeof(_PATH_DEV) - 1;
strlcpy(md.md_provider, name, sizeof(md.md_provider));
}
md.md_provsize = g_get_mediasize(name);
OpenPOWER on IntegriCloud