summaryrefslogtreecommitdiffstats
path: root/sbin/geom/class/concat
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2010-10-09 20:20:27 +0000
committerae <ae@FreeBSD.org>2010-10-09 20:20:27 +0000
commitab9dd3ef5837b16243ea56cca50dce6f2709cb92 (patch)
tree724bc9f6b5d1845293adad1d0f93b93234459cf7 /sbin/geom/class/concat
parent0061fd332ca7c71fd44b7390a2eb33e53f4539ce (diff)
downloadFreeBSD-src-ab9dd3ef5837b16243ea56cca50dce6f2709cb92.zip
FreeBSD-src-ab9dd3ef5837b16243ea56cca50dce6f2709cb92.tar.gz
Replace strlen(_PATH_DEV) with sizeof(_PATH_DEV) - 1.
Suggested by: kib Approved by: kib (mentor) MFC after: 5 days
Diffstat (limited to 'sbin/geom/class/concat')
-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