Fixed this analysis flag by reporting the error and returning NULL.
authorPeter Hosey <hg@boredzo.org>
Sat Oct 10 12:24:03 2009 -0700 (2009-10-10)
changeset 4507b5cd8c227a69
parent 4506 4ea69f1de365
child 4508 ebe7f0a2ff4d
Fixed this analysis flag by reporting the error and returning NULL.
Extras/HardwareGrowler/FireWireNotifier.c
     1.1 --- a/Extras/HardwareGrowler/FireWireNotifier.c	Sat Oct 10 12:18:37 2009 -0700
     1.2 +++ b/Extras/HardwareGrowler/FireWireNotifier.c	Sat Oct 10 12:24:03 2009 -0700
     1.3 @@ -15,6 +15,10 @@
     1.4  	io_name_t		deviceNameChars;
     1.5  
     1.6  	nameResult = IORegistryEntryGetName(thisObject, deviceNameChars);
     1.7 +	if (nameResult != KERN_SUCCESS) {
     1.8 +		NSLog(CFSTR("Could not get name for FireWire object: IORegistryEntryGetName returned 0x%x"), nameResult);
     1.9 +		return NULL;
    1.10 +	}
    1.11  	CFStringRef tempDeviceName = CFStringCreateWithCString(kCFAllocatorDefault,
    1.12  														   deviceNameChars,
    1.13  														   kCFStringEncodingASCII);