]> granicus.if.org Git - libevent/commitdiff
Move assignment outside tt_assert in ssl unit tests. Appeases coverity.
authorNick Mathewson <nickm@torproject.org>
Thu, 26 Jul 2012 14:37:47 +0000 (10:37 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 26 Jul 2012 14:37:47 +0000 (10:37 -0400)
test/regress_ssl.c

index a2b7f05beb4fabc7477ce9331e1d30cc2a233f89..8e0087aac245793fa2be0ff8cbead5c2098d2b0e 100644 (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));