From ffcd00b75aa6515256ae5f843ae4ef1e7dca435c Mon Sep 17 00:00:00 2001 From: midipix Date: Thu, 31 Dec 2015 09:37:37 -0500 Subject: driver: fix semantics of calloc() calls. --- src/driver/pe_unit_ctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/driver/pe_unit_ctx.c') diff --git a/src/driver/pe_unit_ctx.c b/src/driver/pe_unit_ctx.c index b26c5ba..40b2a33 100644 --- a/src/driver/pe_unit_ctx.c +++ b/src/driver/pe_unit_ctx.c @@ -26,7 +26,7 @@ int pe_get_unit_ctx( struct pe_unit_ctx_impl * ctx; int prot; - if (!dctx || !(ctx = calloc(sizeof(*ctx),1))) + if (!dctx || !(ctx = calloc(1,sizeof(*ctx)))) return -1; prot = (dctx->cctx->actflags & PERK_ACTION_MAP_READWRITE) -- cgit v1.2.3