Copyright(c) 2011-2016 Intel Corporation All rights reserved.
Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
+ modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
uint32_t lens[TEST_BUFS];
unsigned int jobs, t;
uint8_t *tmp_buf;
+ int ret;
printf("multibinary_sha256 test, %d sets of %dx%d max: ", RANDOMS, TEST_BUFS,
TEST_LEN);
- posix_memalign((void *)&mgr, 16, sizeof(SHA256_HASH_CTX_MGR));
+ ret = posix_memalign((void *)&mgr, 16, sizeof(SHA256_HASH_CTX_MGR));
+ if ((ret != 0) || (mgr == NULL)) {
+ printf("posix_memalign failed test aborted\n");
+ return 1;
+ }
+
sha256_ctx_mgr_init(mgr);
srand(TEST_SEED);