optimized parser->success()

This commit is contained in:
Andreas Steffen
2008-04-26 11:08:36 +00:00
parent df231f5488
commit c3628ebc35
8 changed files with 54 additions and 71 deletions
+2 -3
View File
@@ -399,7 +399,7 @@ static bool parse_attributes(chunk_t chunk, int level0, private_pkcs9_t* this)
chunk_t object;
int objectID;
int oid = OID_UNKNOWN;
bool success = TRUE;
bool success = FALSE;
parser = asn1_parser_create(attributesObjects, ATTRIBUTE_OBJ_ROOF, chunk);
parser->set_top_level(parser, level0);
@@ -433,16 +433,15 @@ static bool parse_attributes(chunk_t chunk, int level0, private_pkcs9_t* this)
parser->get_level(parser)+1,
oid_names[oid].name))
{
success = FALSE;
goto end;
}
}
}
}
}
success = parser->success(parser);
end:
success &= parser->success(parser);
parser->destroy(parser);
return success;
}