summaryrefslogtreecommitdiff
path: root/src/erasurecode_preprocessing.c
diff options
context:
space:
mode:
authorKevin Greenan <kmg@box.com>2014-07-22 12:31:17 -0700
committerKevin Greenan <kmg@box.com>2014-07-22 12:33:06 -0700
commitbde7428542598b838c5225b428b1e7c55b8ece29 (patch)
tree811fb25035bc7d2278698857b6b196cec37b2c39 /src/erasurecode_preprocessing.c
parent99b47cb356d5cc59e1484a0e947a989171d4b2f7 (diff)
downloadliberasurecode-bde7428542598b838c5225b428b1e7c55b8ece29.tar.gz
Fix simple encode_decode unit test and remove debugging prints.
Diffstat (limited to 'src/erasurecode_preprocessing.c')
-rw-r--r--src/erasurecode_preprocessing.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/erasurecode_preprocessing.c b/src/erasurecode_preprocessing.c
index 6591180..d7f78b6 100644
--- a/src/erasurecode_preprocessing.c
+++ b/src/erasurecode_preprocessing.c
@@ -277,7 +277,7 @@ int fragments_to_string(int k, int m,
int ret = -1;
if (num_fragments < k) {
- /*
+ /*
* This is not necessarily an error condition, so *do not log here*
* We can maybe debug log, if necessary.
*/
@@ -314,20 +314,20 @@ int fragments_to_string(int k, int m,
continue;
} else {
/* Make sure we account for duplicates */
- if (NULL != data[index]) {
+ if (NULL != fragments[index]) {
data[index] = fragments[i];
num_data++;
}
}
+ }
- /* We do not have enough data fragments to do this! */
- if (num_data != k) {
- /*
- * This is not necessarily an error condition, so *do not log here*
- * We can maybe debug log, if necessary.
- */
- goto out;
- }
+ /* We do not have enough data fragments to do this! */
+ if (num_data != k) {
+ /*
+ * This is not necessarily an error condition, so *do not log here*
+ * We can maybe debug log, if necessary.
+ */
+ goto out;
}
/* Create the string to return */