diff options
author | cathook <cat.hook31894@gmail.com> | 2013-11-26 00:02:50 +0800 |
---|---|---|
committer | cathook <cat.hook31894@gmail.com> | 2013-11-26 02:41:11 +0800 |
commit | c88ab16511df6eef6f7017a39e1a48deed6bd1f3 (patch) | |
tree | 1d3310096973c15661878bdcbc60f0689cd58072 /src/utility.c | |
parent | 5c6353aac348cfe3b9ac56110dbdf7a56afc1fbd (diff) | |
download | ctl-c88ab16511df6eef6f7017a39e1a48deed6bd1f3.tar.gz ctl-c88ab16511df6eef6f7017a39e1a48deed6bd1f3.tar.zst ctl-c88ab16511df6eef6f7017a39e1a48deed6bd1f3.zip |
add ctl_free function
Diffstat (limited to 'src/utility.c')
-rw-r--r-- | src/utility.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utility.c b/src/utility.c index bcc2500..7287908 100644 --- a/src/utility.c +++ b/src/utility.c @@ -22,6 +22,12 @@ pvoid ctl_realloc(pvoid ptr, size_t size){ return ptr; } +/*********** like free(), but will return NULL ************/ +pvoid ctl_free(pvoid ptr){ + free(ptr); + return NULL; +} + /********* print some message on STDERR and exit() ********/ void ctl_die(ErrorType e){ fprintf(stderr, "exit(%d): ", (int)e); |