diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2017-06-22 08:26:27 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2017-06-22 08:26:27 -0400 |
commit | 288b15d0793936fa14b51ed860056f6ce6200c52 (patch) | |
tree | 5de9e9dca8b30e8d168da8661ae88e3ffe2504a3 /old-extension | |
parent | b7d8b6ebcd5dd714bc21acf7637d9a651e2f7ea7 (diff) | |
download | egawk-288b15d0793936fa14b51ed860056f6ce6200c52.tar.gz egawk-288b15d0793936fa14b51ed860056f6ce6200c52.tar.bz2 egawk-288b15d0793936fa14b51ed860056f6ce6200c52.zip |
Replace malloc+memset with calloc, mostly by using the new ezalloc macro.
Diffstat (limited to 'old-extension')
-rw-r--r-- | old-extension/ChangeLog | 4 | ||||
-rw-r--r-- | old-extension/bindarr.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/old-extension/ChangeLog b/old-extension/ChangeLog index bd848f9a..99352c6e 100644 --- a/old-extension/ChangeLog +++ b/old-extension/ChangeLog @@ -1,3 +1,7 @@ +2017-06-21 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * bindarr.c (do_bind_array): Replace emalloc+memset with ezalloc. + 2016-10-23 Arnold D. Robbins <arnold@skeeve.com> * General: Remove trailing whitespace from all relevant files. diff --git a/old-extension/bindarr.c b/old-extension/bindarr.c index 1a0104db..34e7e983 100644 --- a/old-extension/bindarr.c +++ b/old-extension/bindarr.c @@ -209,8 +209,7 @@ do_bind_array(int nargs) assoc_clear(symbol); - emalloc(aq, array_t *, sizeof(array_t), "do_bind_array"); - memset(aq, '\0', sizeof(array_t)); + ezalloc(aq, array_t *, sizeof(array_t), "do_bind_array"); t = get_array_argument(1, false); |