Skip to content

Commit

Permalink
Fix compiling errors in fpga impl. (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajblane authored and Zhen Wei committed Sep 27, 2018
1 parent 8d95ec5 commit db71be8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pow_fpga_accel.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static bool PoWFPGAAccel(void *pow_ctx)
char buf[4];
bool res = true;

Trytes_t *object_tryte = NULL, nonce_tryte = NULL;
Trytes_t *object_tryte = NULL, *nonce_tryte = NULL;
Trits_t *object_trit = NULL, *object_nonce_trit = NULL;
time_t start_time, end_time;

Expand All @@ -54,7 +54,7 @@ static bool PoWFPGAAccel(void *pow_ctx)
lseek(ctx->ctrl_fd, 0, 0);
lseek(ctx->out_fd, 0, 0);

if (write(ctx->in_fd, (char *) object_trits->data, TRANSACTION_TRITS_LENGTH) <
if (write(ctx->in_fd, (char *) object_trit->data, TRANSACTION_TRITS_LENGTH) <
0) {
res = false;
goto fail;
Expand Down Expand Up @@ -89,7 +89,7 @@ static bool PoWFPGAAccel(void *pow_ctx)
}

memcpy(ctx->output_trytes, ctx->input_trytes, (NonceTrinaryOffset) / 3);
memcpy(ctx->output_trytes + ((NonceTrinaryOffset) / 3), nonce_trytes->data,
memcpy(ctx->output_trytes + ((NonceTrinaryOffset) / 3), nonce_tryte->data,
((TRANSACTION_TRITS_LENGTH) - (NonceTrinaryOffset)) / 3);

fail:
Expand Down

0 comments on commit db71be8

Please sign in to comment.