Bug 1167693 - Ensure device and vendor IDs are zero-padded. r=mstange
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 01 Jun 2015 17:04:15 -0400
changeset 246563 c57b171813bf
parent 246562 eff7275c4950
child 246564 e7f1e7b7e095
push id60475
push userkgupta@mozilla.com
push date2015-06-01 21:04 +0000
treeherdermozilla-inbound@e7f1e7b7e095 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1167693
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1167693 - Ensure device and vendor IDs are zero-padded. r=mstange
widget/cocoa/GfxInfo.mm
--- a/widget/cocoa/GfxInfo.mm
+++ b/widget/cocoa/GfxInfo.mm
@@ -83,22 +83,22 @@ static uint32_t IntValueOfCFData(CFDataR
 }
 
 void
 GfxInfo::GetDeviceInfo()
 {
   io_registry_entry_t dsp_port = CGDisplayIOServicePort(kCGDirectMainDisplay);
   CFTypeRef vendor_id_ref = SearchPortForProperty(dsp_port, CFSTR("vendor-id"));
   if (vendor_id_ref) {
-    mAdapterVendorID.AppendPrintf("0x%4x", IntValueOfCFData((CFDataRef)vendor_id_ref));
+    mAdapterVendorID.AppendPrintf("0x%04x", IntValueOfCFData((CFDataRef)vendor_id_ref));
     CFRelease(vendor_id_ref);
   }
   CFTypeRef device_id_ref = SearchPortForProperty(dsp_port, CFSTR("device-id"));
   if (device_id_ref) {
-    mAdapterDeviceID.AppendPrintf("0x%4x", IntValueOfCFData((CFDataRef)device_id_ref));
+    mAdapterDeviceID.AppendPrintf("0x%04x", IntValueOfCFData((CFDataRef)device_id_ref));
     CFRelease(device_id_ref);
   }
 }
 
 void
 GfxInfo::GetSelectedCityInfo()
 {
   NSDictionary* selected_city =