am 1a5b6098: Handle GET_POWER failures
* commit '1a5b6098d5002ae07ce3f9bc514400a87c2b64fa': Handle GET_POWER failures
This commit is contained in:
@@ -402,7 +402,9 @@ static jint android_net_wifi_getPowerModeCommand(JNIEnv* env, jobject clazz)
|
||||
}
|
||||
// reply comes back in the form "powermode = XX" where XX is the
|
||||
// number we're interested in.
|
||||
sscanf(reply, "%*s = %u", &power);
|
||||
if (sscanf(reply, "%*s = %u", &power) != 1) {
|
||||
return (jint)-1;
|
||||
}
|
||||
return (jint)power;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user