dumpstate: Properly handle unfound pid
The function GetPidByName() returns -1 if we can't find the pid. But since we had 'pid' as unsigned, this became a huge positive number for us, and we didn't fail the "pid > 0" check as expected. We switch 'pid' to a signed int, so now this logic flows as expected. Test: Grab a bugreport on a device without /system/bin/anrd and confirm we no longer get the "Failed to find" error in logcat. Change-Id: I83bcbbe3f189a705fd0ad83ae600c45196048a3f
Loading
Please register or sign in to comment