Move assignment outside tt_assert in ssl unit tests. Appeases coverity.

This commit is contained in:
Nick Mathewson 2012-07-26 10:37:47 -04:00
parent b9e7329751
commit a2006c0087

View File

@ -108,7 +108,8 @@ getcert(void)
name = X509_NAME_new();
tt_assert(name);
tt_assert(NID_undef != (nid = OBJ_txt2nid("commonName")));
nid = OBJ_txt2nid("commonName");
tt_assert(NID_undef != nid);
tt_assert(0 != X509_NAME_add_entry_by_NID(
name, nid, MBSTRING_ASC, (unsigned char*)"example.com",
-1, -1, 0));