summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2016-04-21 21:13:41 +0000
committerasomers <asomers@FreeBSD.org>2016-04-21 21:13:41 +0000
commit289cd3b2aac5bf6127bf34eff1bb09db512cc8c7 (patch)
tree3f4ea00d3911ebcb67a1467e8ec8435c12cf4093 /sys/geom
parentad985a2ffd838529d173d5dbaed92ebf2da3cf8b (diff)
downloadFreeBSD-src-289cd3b2aac5bf6127bf34eff1bb09db512cc8c7.zip
FreeBSD-src-289cd3b2aac5bf6127bf34eff1bb09db512cc8c7.tar.gz
DRY on buffer sizes. Update to r298420.
sys/geom/geom_disk.c: In disk_attr_changed, don't repeat a buffer size. Reported by: ngie, hselasky MFC after: 4 weeks X-MFC-With: 298420 Sponsored by: Spectra Logic Corp
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/geom_disk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c
index fa505de..b2d8e8c 100644
--- a/sys/geom/geom_disk.c
+++ b/sys/geom/geom_disk.c
@@ -846,7 +846,8 @@ disk_attr_changed(struct disk *dp, const char *attr, int flag)
if (gp != NULL)
LIST_FOREACH(pp, &gp->provider, provider)
(void)g_attr_changed(pp, attr, flag);
- snprintf(devnamebuf, 128, "devname=%s%d", dp->d_name, dp->d_unit);
+ snprintf(devnamebuf, sizeof(devnamebuf), "devname=%s%d", dp->d_name,
+ dp->d_unit);
devctl_notify("GEOM", "disk", attr, devnamebuf);
}
OpenPOWER on IntegriCloud