svn commit: r298439 - head/sys/geom
Alan Somers
asomers at FreeBSD.org
Thu Apr 21 21:13:43 UTC 2016
Author: asomers
Date: Thu Apr 21 21:13:41 2016
New Revision: 298439
URL: https://svnweb.freebsd.org/changeset/base/298439
Log:
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
Modified:
head/sys/geom/geom_disk.c
Modified: head/sys/geom/geom_disk.c
==============================================================================
--- head/sys/geom/geom_disk.c Thu Apr 21 20:38:10 2016 (r298438)
+++ head/sys/geom/geom_disk.c Thu Apr 21 21:13:41 2016 (r298439)
@@ -846,7 +846,8 @@ disk_attr_changed(struct disk *dp, const
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);
}
More information about the svn-src-head
mailing list