X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/4f5e39ecfaa49376b0a5c3a4c384e91a828c1105..9c7a0b4e57f18adee8545804e34667334c426635:/random.c diff --git a/random.c b/random.c index 111f16e..0c0f947 100644 --- a/random.c +++ b/random.c @@ -14,7 +14,7 @@ struct rgen_data { }; static random_fn random_generate; -static bool_t random_generate(void *data, uint32_t bytes, uint8_t *buff) +static bool_t random_generate(void *data, int32_t bytes, uint8_t *buff) { struct rgen_data *st=data; int r; @@ -51,7 +51,7 @@ static list_t *random_apply(closure_t *self, struct cloc loc, item_t *arg1, *arg2; string_t filename=NULL; - st=safe_malloc(sizeof(*st),"random_apply"); + NEW(st); st->cl.description="randomsource"; st->cl.type=CL_RANDOMSRC;