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.
SHA256_HASH_CTX ctxpool[NUM_JOBS], *ctx = NULL;
uint32_t i, j, k, t, checked = 0;
uint32_t *good;
+ int ret;
+
+ 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;
+ }
- posix_memalign((void *)&mgr, 16, sizeof(SHA256_HASH_CTX_MGR));
sha256_ctx_mgr_init(mgr);
// Init contexts before first use