summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKota Tsuyuzaki <bloodeagle40234@gmail.com>2015-03-09 13:08:17 +0900
committerTushar Gohad <tushar.gohad@intel.com>2015-03-09 04:59:54 +0000
commitd57a686df96d237ec28e73e6d484c49349690249 (patch)
tree6dbe7fd919804a293164bc5d7af07184881e33f7
parent0e535da2a768807794046681f8722b533960eae1 (diff)
downloadliberasurecode-d57a686df96d237ec28e73e6d484c49349690249.tar.gz
Use enum value when handling shss
-rw-r--r--src/erasurecode.c2
-rw-r--r--test/liberasurecode_test.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/erasurecode.c b/src/erasurecode.c
index 129ea4b..c932c85 100644
--- a/src/erasurecode.c
+++ b/src/erasurecode.c
@@ -562,7 +562,7 @@ int liberasurecode_decode(int desc,
goto out;
}
- if (instance->common.id != 5) {
+ if (instance->common.id != EC_BACKEND_SHSS) {
/* shss (ntt_backend) must force to decode */
// TODO: Add a frag and function to handle whether the backend want to decode or not.
/*
diff --git a/test/liberasurecode_test.c b/test/liberasurecode_test.c
index 33ba5a5..c45e034 100644
--- a/test/liberasurecode_test.c
+++ b/test/liberasurecode_test.c
@@ -643,7 +643,7 @@ static void encode_decode_test_impl(const ec_backend_id_t be_id,
char *data_ptr = frag + frag_header_size;
int cmp_size = remaining >= metadata.size ? metadata.size : remaining;
// shss doesn't keep original data on data fragments
- if (be_id != 5) {
+ if (be_id != EC_BACKEND_SHSS) {
assert(memcmp(data_ptr, orig_data_ptr, cmp_size) == 0);
}
remaining -= cmp_size;