summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Taubert <ttaubert@mozilla.com>2016-09-15 16:38:08 -0700
committerTim Taubert <ttaubert@mozilla.com>2016-09-15 16:38:08 -0700
commita97e2ba975e8ef3124e842f190a53b8f70b38278 (patch)
tree50cb804198b58ab3cb1a96765b2fe75143850a9d
parent258a9ad881ec3ee4d90fe9f82513ef0f1a435048 (diff)
downloadnss-hg-a97e2ba975e8ef3124e842f190a53b8f70b38278.tar.gz
Bug 1302568 - [CID 1372890] API usage errors (VARARGS) r=franziskus
-rw-r--r--lib/certhigh/ocsp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/certhigh/ocsp.c b/lib/certhigh/ocsp.c
index fc143f558..1672b661a 100644
--- a/lib/certhigh/ocsp.c
+++ b/lib/certhigh/ocsp.c
@@ -2204,7 +2204,7 @@ CERT_AddOCSPAcceptableResponses(CERTOCSPRequest *request,
SECOidTag responseType0, ...)
{
void *extHandle;
- va_list ap, ap2;
+ va_list ap;
int i, count;
SECOidTag responseType;
SECOidData *responseOid;
@@ -2222,7 +2222,6 @@ CERT_AddOCSPAcceptableResponses(CERTOCSPRequest *request,
count = 1;
if (responseType0 != SEC_OID_PKIX_OCSP_BASIC_RESPONSE) {
va_start(ap, responseType0);
- va_copy(ap2, ap);
do {
count++;
responseType = va_arg(ap, SECOidTag);
@@ -2238,12 +2237,13 @@ CERT_AddOCSPAcceptableResponses(CERTOCSPRequest *request,
responseOid = SECOID_FindOIDByTag(responseType0);
acceptableResponses[i++] = &(responseOid->oid);
if (count > 1) {
+ va_start(ap, responseType0);
for (; i < count; i++) {
- responseType = va_arg(ap2, SECOidTag);
+ responseType = va_arg(ap, SECOidTag);
responseOid = SECOID_FindOIDByTag(responseType);
acceptableResponses[i] = &(responseOid->oid);
}
- va_end(ap2);
+ va_end(ap);
}
acceptableResponses[i] = NULL;