Fix control flow issues. (#171)

This commit is contained in:
Jonathan Hui
2016-06-17 11:58:37 -07:00
committed by GitHub
parent 0a45e89955
commit 2e17520f07
5 changed files with 8 additions and 7 deletions
+2 -1
View File
@@ -395,10 +395,10 @@ exit:
void Interpreter::ProcessMasterKey(int argc, char *argv[])
{
ThreadError error = kThreadError_None;
uint8_t keyLength;
if (argc == 0)
{
uint8_t keyLength;
const uint8_t *key = otGetMasterKey(&keyLength);
for (int i = 0; i < keyLength; i++)
@@ -410,6 +410,7 @@ void Interpreter::ProcessMasterKey(int argc, char *argv[])
}
else
{
int8_t keyLength;
uint8_t key[16];
VerifyOrExit((keyLength = Hex2Bin(argv[0], key, sizeof(key))) >= 0, error = kThreadError_Parse);