diff options
author | Thomas Adam <thomas@xteddy.org> | 2014-10-16 16:46:31 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2014-10-16 16:46:31 +0100 |
commit | a77355b6bf9a0beb2e9d0a8b9613266984bb598d (patch) | |
tree | 38ca21b0aeb986adea2de22cc12adda8a52cf4c5 /format.c | |
parent | 2874a431c050527244a56e7f241baf053c722f88 (diff) | |
parent | a27ba6e38006c12c48de88600b8cff9f6aabfed7 (diff) | |
download | rtmux-a77355b6bf9a0beb2e9d0a8b9613266984bb598d.tar.gz rtmux-a77355b6bf9a0beb2e9d0a8b9613266984bb598d.tar.bz2 rtmux-a77355b6bf9a0beb2e9d0a8b9613266984bb598d.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -267,7 +267,7 @@ format_replace(struct format_tree *ft, const char *key, size_t keylen, /* Expand the buffer and copy in the value. */ while (*len - *off < valuelen + 1) { - *buf = xrealloc(*buf, 2, *len); + *buf = xreallocarray(*buf, 2, *len); *len *= 2; } memcpy(*buf + *off, value, valuelen); @@ -298,7 +298,7 @@ format_expand(struct format_tree *ft, const char *fmt) while (*fmt != '\0') { if (*fmt != '#') { while (len - off < 2) { - buf = xrealloc(buf, 2, len); + buf = xreallocarray(buf, 2, len); len *= 2; } buf[off++] = *fmt++; @@ -326,7 +326,7 @@ format_expand(struct format_tree *ft, const char *fmt) continue; case '#': while (len - off < 2) { - buf = xrealloc(buf, 2, len); + buf = xreallocarray(buf, 2, len); len *= 2; } buf[off++] = '#'; @@ -339,7 +339,7 @@ format_expand(struct format_tree *ft, const char *fmt) s = format_lower[ch - 'a']; if (s == NULL) { while (len - off < 3) { - buf = xrealloc(buf, 2, len); + buf = xreallocarray(buf, 2, len); len *= 2; } buf[off++] = '#'; |