зеркало из https://github.com/mozilla/gecko-dev.git
Bugzilla bug #77884: fixed discrepancy between the size of an array and
the variable that represents the array size. Let the compiler compute the value for us instead of using hardcoded constants. Thanks to andrew@fernandes.org for reporting and tracking down this bug.
This commit is contained in:
Родитель
b72d3721bf
Коммит
29aa0c3c90
|
@ -116,12 +116,14 @@ static MaskString mechanismStrings[] = {
|
|||
{"RANDOM", PUBLIC_MECH_RANDOM_FLAG},
|
||||
{"FRIENDLY", PUBLIC_MECH_FRIENDLY_FLAG}
|
||||
};
|
||||
static int numMechanismStrings = 13;
|
||||
static int numMechanismStrings =
|
||||
sizeof(mechanismStrings) / sizeof(mechanismStrings[0]);
|
||||
|
||||
static MaskString cipherStrings[] = {
|
||||
{"FORTEZZA", PUBLIC_CIPHER_FORTEZZA_FLAG}
|
||||
};
|
||||
static int numCipherStrings= 1;
|
||||
static int numCipherStrings =
|
||||
sizeof(cipherStrings) / sizeof(cipherStrings[0]);
|
||||
|
||||
/* Maximum length of a colon-separated list of all the strings in an
|
||||
* array. */
|
||||
|
@ -355,7 +357,6 @@ loser:
|
|||
}
|
||||
|
||||
/* Strings describing PK11DisableReasons */
|
||||
static int numDisableReasonStr = 5;
|
||||
static char *disableReasonStr[] = {
|
||||
"no reason",
|
||||
"user disabled",
|
||||
|
@ -363,6 +364,8 @@ static char *disableReasonStr[] = {
|
|||
"could not verify token",
|
||||
"token not present"
|
||||
};
|
||||
static int numDisableReasonStr =
|
||||
sizeof(disableReasonStr) / sizeof(disableReasonStr[0]);
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
|
|
Загрузка…
Ссылка в новой задаче