Skip to content

Commit

Permalink
VS2010 build: Prepare scrypt.c
Browse files Browse the repository at this point in the history
Cherry-picked by veox.
  • Loading branch information
Sanjin Trošelj authored and veox committed Jan 27, 2014
1 parent 5d57691 commit e35d7b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ void scrypt_regenhash(struct work *work)

be32enc_vect(data, (const uint32_t *)work->data, 19);
data[19] = htobe32(*nonce);
scratchbuf = alloca(SCRATCHBUF_SIZE);
scratchbuf = (char *)alloca(SCRATCHBUF_SIZE);
scrypt_1024_1_1_256_sp(data, scratchbuf, ohash);
flip32(ohash, ohash);
}
Expand All @@ -430,7 +430,7 @@ int scrypt_test(unsigned char *pdata, const unsigned char *ptarget, uint32_t non

be32enc_vect(data, (const uint32_t *)pdata, 19);
data[19] = htobe32(nonce);
scratchbuf = alloca(SCRATCHBUF_SIZE);
scratchbuf = (char *)alloca(SCRATCHBUF_SIZE);
scrypt_1024_1_1_256_sp(data, scratchbuf, ohash);
tmp_hash7 = be32toh(ohash[7]);

Expand Down Expand Up @@ -459,7 +459,7 @@ bool scanhash_scrypt(struct thr_info *thr, const unsigned char __maybe_unused *p

be32enc_vect(data, (const uint32_t *)pdata, 19);

scratchbuf = malloc(SCRATCHBUF_SIZE);
scratchbuf = (char *)malloc(SCRATCHBUF_SIZE);
if (unlikely(!scratchbuf)) {
applog(LOG_ERR, "Failed to malloc scratchbuf in scanhash_scrypt");
return ret;
Expand Down

0 comments on commit e35d7b1

Please sign in to comment.