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); } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"