chiark / gitweb /
authbind: Better logging of authbind failures
[secnet.git] / random.c
index 111f16ec787ddae5d347fd7f54be6462831ba378..0c0f947d03c78cdb84f8a316e18684310aadf1d5 100644 (file)
--- 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;