Tidy dcb_free (prefer use of dcb_close) and remove from test code; add good random number generator.

This commit is contained in:
counterpoint
2015-08-26 15:43:21 +01:00
parent 72b301785b
commit 1f6b544f33
7 changed files with 14 additions and 23 deletions

View File

@ -59,9 +59,9 @@ int buflen;
printAllDCBs();
ss_info_dassert(true, "Something is true");
ss_dfprintf(stderr, "\t..done\n");
dcb_free(dcb);
ss_dfprintf(stderr, "Freed original dcb");
ss_info_dassert(!dcb_isvalid(dcb), "Freed DCB must not be valid");
dcb_close(dcb);
ss_dfprintf(stderr, "Closed original dcb");
ss_info_dassert(!dcb_isvalid(dcb), "Closed DCB must not be valid");
ss_dfprintf(stderr, "\t..done\nMake clone DCB a zombie");
clone->state = DCB_STATE_NOPOLLING;
dcb_close(clone);