diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-22 06:35:07 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-22 06:35:07 -0700 |
commit | 1f57463ee7f381bd527f2b8ea1638ae8a3916834 (patch) | |
tree | e3a640cbd046068391101f99a0efb61549d3e260 /signal.h | |
parent | 206f432b1b5811c99ecf5f14a914de8da37277c0 (diff) | |
download | txr-1f57463ee7f381bd527f2b8ea1638ae8a3916834.tar.gz txr-1f57463ee7f381bd527f2b8ea1638ae8a3916834.tar.bz2 txr-1f57463ee7f381bd527f2b8ea1638ae8a3916834.zip |
Introduce chk_wmalloc function.
Two-fold benefit. Simplifies code which allocates wchar_t
arrays. Provides overflow check for the multiplication.
* lib.c (chk_wmalloc): New function.
(chk_strdup, mkstring, mkustring, upcase_str, downcase_str,
sub_str, cat_str, trim_str): Use chk_wmalloc.
* lib.h (chk_wmalloc): Declared.
* stream.c (make_string_output_stream): Use chk_wmalloc.
* utf8.c (utf8_dup_from_uc, utf8_dup_from): Likewise.
Diffstat (limited to 'signal.h')
0 files changed, 0 insertions, 0 deletions