summaryrefslogtreecommitdiff
path: root/src/driver
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-12-31 09:39:48 -0500
committermidipix <writeonce@midipix.org>2015-12-31 09:39:48 -0500
commita2826e00278ef7824c821c8bd6e45e77299742e7 (patch)
tree3b20b6e27b0f5855ab0c39b9a0d1a636d93cb7ad /src/driver
parent5c5a0d57af3c0aa85a0dafbec14f519b1cdbd5a2 (diff)
downloadsofort-a2826e00278ef7824c821c8bd6e45e77299742e7.tar.bz2
sofort-a2826e00278ef7824c821c8bd6e45e77299742e7.tar.xz
driver: fix semantics of calloc() calls.
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/sfrt_driver_ctx.c2
-rw-r--r--src/driver/sfrt_unit_ctx.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/driver/sfrt_driver_ctx.c b/src/driver/sfrt_driver_ctx.c
index 59ee7e2..f09fd14 100644
--- a/src/driver/sfrt_driver_ctx.c
+++ b/src/driver/sfrt_driver_ctx.c
@@ -64,7 +64,7 @@ static struct sfrt_driver_ctx_impl * sfrt_driver_ctx_alloc(
size = sizeof(struct sfrt_driver_ctx_alloc);
size += (nunits+1)*sizeof(const char *);
- if (!(ictx = calloc(size,1)))
+ if (!(ictx = calloc(1,size)))
return 0;
if (cctx)
diff --git a/src/driver/sfrt_unit_ctx.c b/src/driver/sfrt_unit_ctx.c
index cef9913..672c323 100644
--- a/src/driver/sfrt_unit_ctx.c
+++ b/src/driver/sfrt_unit_ctx.c
@@ -24,7 +24,7 @@ int sfrt_get_unit_ctx(
{
struct sfrt_unit_ctx_impl * ctx;
- if (!dctx || !(ctx = calloc(sizeof(*ctx),1)))
+ if (!dctx || !(ctx = calloc(1,sizeof(*ctx))))
return -1;
if (sfrt_map_input(-1,path,PROT_READ,&ctx->map))