diff options
author | ae <ae@FreeBSD.org> | 2010-10-09 20:20:27 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2010-10-09 20:20:27 +0000 |
commit | ab9dd3ef5837b16243ea56cca50dce6f2709cb92 (patch) | |
tree | 724bc9f6b5d1845293adad1d0f93b93234459cf7 /sbin/geom/class/part | |
parent | 0061fd332ca7c71fd44b7390a2eb33e53f4539ce (diff) | |
download | FreeBSD-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/part')
-rw-r--r-- | sbin/geom/class/part/geom_part.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/geom/class/part/geom_part.c b/sbin/geom/class/part/geom_part.c index 426e1d6..55db274 100644 --- a/sbin/geom/class/part/geom_part.c +++ b/sbin/geom/class/part/geom_part.c @@ -187,8 +187,8 @@ find_geom(struct gclass *classp, const char *name) { struct ggeom *gp; - 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; LIST_FOREACH(gp, &classp->lg_geom, lg_geom) { if (strcmp(gp->lg_name, name) == 0) return (gp); |