X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/0f00dc4c8eb47e67bc0f148c2dd109f73a451e0a..141c12847a1c2f8cc8db03d420551584e689fb87:/pub/bbs-rand.c diff --git a/pub/bbs-rand.c b/pub/bbs-rand.c index 58b62b10..c3ae2682 100644 --- a/pub/bbs-rand.c +++ b/pub/bbs-rand.c @@ -348,7 +348,7 @@ static const grand_ops gops = { "bbs", GRAND_CRYPTO, 0, gmisc, gdestroy, - gword, gbyte, gword, grand_range, grand_fill + gword, gbyte, gword, grand_defaultrange, grand_defaultfill }; /* --- @bbs_rand@ --- * @@ -374,6 +374,8 @@ grand *bbs_rand(mp *m, mp *x) #ifdef TEST_RIG +#include + static int verify(dstr *v) { mp *n = *(mp **)v[0].buf; @@ -385,7 +387,7 @@ static int verify(dstr *v) dstr_ensure(&d, v[2].len); b->ops->fill(b, d.buf, v[2].len); d.len = v[2].len; - if (memcmp(d.buf, v[2].buf, v[2].len) != 0) { + if (MEMCMP(d.buf, !=, v[2].buf, v[2].len)) { fputs("\n*** bbs failure\n", stderr); fputs("n = ", stderr); mp_writefile(n, stderr, 10); fputc('\n', stderr); fputs("x = ", stderr); mp_writefile(x, stderr, 10); fputc('\n', stderr);