libi3: change scalloc() signature to match calloc()

This commit is contained in:
shdown
2015-08-03 12:50:13 +03:00
parent 05fb909636
commit bc52fae15c
32 changed files with 80 additions and 81 deletions

@ -23,8 +23,8 @@ static iconv_t ucs2_conversion_descriptor = (iconv_t)-1;
*/
char *convert_ucs2_to_utf8(xcb_char2b_t *text, size_t num_glyphs) {
/* Allocate the output buffer (UTF-8 is at most 4 bytes per glyph) */
size_t buffer_size = num_glyphs * 4 * sizeof(char) + 1;
char *buffer = scalloc(buffer_size);
size_t buffer_size = num_glyphs * 4 + 1;
char *buffer = scalloc(buffer_size, 1);
/* We need to use an additional pointer, because iconv() modifies it */
char *output = buffer;