Author: mav Date: Wed Feb 25 10:18:11 2015 New Revision: 279278 URL: https://svnweb.freebsd.org/changeset/base/279278
Log: Replace constant with proper sizeof(). Submitted by: Dmitry Luhtionov <[email protected]> MFC after: 2 weeks Modified: head/sys/geom/raid/md_intel.c head/sys/geom/raid/md_jmicron.c head/sys/geom/raid/md_nvidia.c head/sys/geom/raid/md_promise.c head/sys/geom/raid/md_sii.c Modified: head/sys/geom/raid/md_intel.c ============================================================================== --- head/sys/geom/raid/md_intel.c Wed Feb 25 10:10:40 2015 (r279277) +++ head/sys/geom/raid/md_intel.c Wed Feb 25 10:18:11 2015 (r279278) @@ -1487,7 +1487,6 @@ g_raid_md_taste_intel(struct g_raid_md_o /* Read metadata from device. */ meta = NULL; - vendor = 0xffff; disk_pos = 0; g_topology_unlock(); error = g_raid_md_get_label(cp, serial, sizeof(serial)); @@ -1496,7 +1495,8 @@ g_raid_md_taste_intel(struct g_raid_md_o pp->name, error); goto fail2; } - len = 2; + vendor = 0xffff; + len = sizeof(vendor); if (pp->geom->rank == 1) g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); meta = intel_meta_read(cp); Modified: head/sys/geom/raid/md_jmicron.c ============================================================================== --- head/sys/geom/raid/md_jmicron.c Wed Feb 25 10:10:40 2015 (r279277) +++ head/sys/geom/raid/md_jmicron.c Wed Feb 25 10:18:11 2015 (r279278) @@ -836,9 +836,9 @@ g_raid_md_taste_jmicron(struct g_raid_md /* Read metadata from device. */ meta = NULL; - vendor = 0xffff; g_topology_unlock(); - len = 2; + vendor = 0xffff; + len = sizeof(vendor); if (pp->geom->rank == 1) g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); meta = jmicron_meta_read(cp); Modified: head/sys/geom/raid/md_nvidia.c ============================================================================== --- head/sys/geom/raid/md_nvidia.c Wed Feb 25 10:10:40 2015 (r279277) +++ head/sys/geom/raid/md_nvidia.c Wed Feb 25 10:18:11 2015 (r279278) @@ -841,9 +841,9 @@ g_raid_md_taste_nvidia(struct g_raid_md_ /* Read metadata from device. */ meta = NULL; - vendor = 0xffff; g_topology_unlock(); - len = 2; + vendor = 0xffff; + len = sizeof(vendor); if (pp->geom->rank == 1) g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); meta = nvidia_meta_read(cp); Modified: head/sys/geom/raid/md_promise.c ============================================================================== --- head/sys/geom/raid/md_promise.c Wed Feb 25 10:10:40 2015 (r279277) +++ head/sys/geom/raid/md_promise.c Wed Feb 25 10:18:11 2015 (r279278) @@ -1105,9 +1105,9 @@ g_raid_md_taste_promise(struct g_raid_md /* Read metadata from device. */ meta = NULL; - vendor = 0xffff; g_topology_unlock(); - len = 2; + vendor = 0xffff; + len = sizeof(vendor); if (pp->geom->rank == 1) g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); subdisks = promise_meta_read(cp, metaarr); Modified: head/sys/geom/raid/md_sii.c ============================================================================== --- head/sys/geom/raid/md_sii.c Wed Feb 25 10:10:40 2015 (r279277) +++ head/sys/geom/raid/md_sii.c Wed Feb 25 10:18:11 2015 (r279278) @@ -923,9 +923,9 @@ g_raid_md_taste_sii(struct g_raid_md_obj /* Read metadata from device. */ meta = NULL; - vendor = 0xffff; g_topology_unlock(); - len = 2; + vendor = 0xffff; + len = sizeof(vendor); if (pp->geom->rank == 1) g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); meta = sii_meta_read(cp); _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "[email protected]"
