зеркало из https://github.com/mozilla/pjs.git
Bug 552951 followup - Avoid the use of goto; r=mayhemer
This commit is contained in:
Родитель
4854227de8
Коммит
0abdca9b13
|
@ -565,18 +565,21 @@ nsKeygenFormProcessor::GetPublicKey(nsAString& aValue, nsAString& aChallenge,
|
||||||
if (strcmp(keyparamsString, "null") == 0)
|
if (strcmp(keyparamsString, "null") == 0)
|
||||||
goto loser;
|
goto loser;
|
||||||
str = keyparamsString;
|
str = keyparamsString;
|
||||||
|
PRBool found_match = PR_FALSE;
|
||||||
do {
|
do {
|
||||||
end = strchr(str, ',');
|
end = strchr(str, ',');
|
||||||
if (end != nsnull)
|
if (end != nsnull)
|
||||||
*end = '\0';
|
*end = '\0';
|
||||||
primeBits = pqg_prime_bits(str);
|
primeBits = pqg_prime_bits(str);
|
||||||
if (keysize == primeBits)
|
if (keysize == primeBits) {
|
||||||
goto found_match;
|
found_match = PR_TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
str = end + 1;
|
str = end + 1;
|
||||||
} while (end != nsnull);
|
} while (end != nsnull);
|
||||||
goto loser;
|
if (!found_match) {
|
||||||
found_match:
|
goto loser;
|
||||||
(void)0;
|
}
|
||||||
} else if (aKeyType.LowerCaseEqualsLiteral("ec")) {
|
} else if (aKeyType.LowerCaseEqualsLiteral("ec")) {
|
||||||
keyparamsString = ToNewCString(aKeyParams);
|
keyparamsString = ToNewCString(aKeyParams);
|
||||||
if (!keyparamsString) {
|
if (!keyparamsString) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче