diff options
author | Thomas Adam <thomas@xteddy.org> | 2014-10-21 07:11:44 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2014-10-21 07:11:44 +0100 |
commit | 562af864bd8ab06c416075b5742ce3bbcf6d0610 (patch) | |
tree | 2c3900dd6b284aa52441c3fde9dfdf8383d87b54 /utf8.c | |
parent | b6aef2490f086f3404f439308bb1746ec5134e9a (diff) | |
parent | 0a1a88d63caf3a0e8b4440686e73e1f0f690e03c (diff) | |
download | rtmux-562af864bd8ab06c416075b5742ce3bbcf6d0610.tar.gz rtmux-562af864bd8ab06c416075b5742ce3bbcf6d0610.tar.bz2 rtmux-562af864bd8ab06c416075b5742ce3bbcf6d0610.zip |
Merge branch 'obsd-master'
Conflicts:
Makefile
cmd-list-commands.c
cmd-suspend-client.c
job.c
tmux.h
xmalloc.c
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -420,7 +420,7 @@ utf8_fromcstr(const char *src) n = 0; while (*src != '\0') { - dst = xrealloc(dst, n + 1, sizeof *dst); + dst = xreallocarray(dst, n + 1, sizeof *dst); if (utf8_open(&dst[n], *src)) { more = 1; while (*++src != '\0' && more) @@ -437,7 +437,7 @@ utf8_fromcstr(const char *src) n++; } - dst = xrealloc(dst, n + 1, sizeof *dst); + dst = xreallocarray(dst, n + 1, sizeof *dst); dst[n].size = 0; return (dst); } @@ -453,12 +453,12 @@ utf8_tocstr(struct utf8_data *src) n = 0; for(; src->size != 0; src++) { - dst = xrealloc(dst, n + src->size, 1); + dst = xreallocarray(dst, n + src->size, 1); memcpy(dst + n, src->data, src->size); n += src->size; } - dst = xrealloc(dst, n + 1, 1); + dst = xreallocarray(dst, n + 1, 1); dst[n] = '\0'; return (dst); } |