diff options
author | midipix <writeonce@midipix.org> | 2015-12-31 09:30:17 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-01-01 22:50:25 -0500 |
commit | 890152e338506badc1348a6d7642414a805b2419 (patch) | |
tree | 2fc33bf98f7a4e294e657ad214c1c2db86373f0d | |
parent | f06b53432ee339c1e123e7432f7c91331a3190a7 (diff) | |
download | apimagic-890152e338506badc1348a6d7642414a805b2419.tar.bz2 apimagic-890152e338506badc1348a6d7642414a805b2419.tar.xz |
driver: fix semantics of calloc() calls.
-rw-r--r-- | src/driver/amgc_driver_ctx.c | 2 | ||||
-rw-r--r-- | src/driver/amgc_unit_ctx.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/driver/amgc_driver_ctx.c b/src/driver/amgc_driver_ctx.c index d2bef3f..66e4f2f 100644 --- a/src/driver/amgc_driver_ctx.c +++ b/src/driver/amgc_driver_ctx.c @@ -80,7 +80,7 @@ static struct amgc_driver_ctx_impl * amgc_driver_ctx_alloc( size = sizeof(struct amgc_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/amgc_unit_ctx.c b/src/driver/amgc_unit_ctx.c index eb65898..6f08ad7 100644 --- a/src/driver/amgc_unit_ctx.c +++ b/src/driver/amgc_unit_ctx.c @@ -118,7 +118,7 @@ int amgc_get_unit_ctx( amgc_init_cparser_unit(); - if (!dctx || !(ctx = calloc(sizeof(*ctx),1))) + if (!dctx || !(ctx = calloc(1,sizeof(*ctx)))) return -1; if (strcmp(path,"-")) |