Don't multiply by sizeof(char) twice.

This is a no-op, since sizeof(char) is 1. But still, we shouldn't
multiply twice, it's misleading.
next
Fernando Tarlá Cardoso Lemos 2012-02-21 14:53:01 -02:00 committed by Michael Stapelberg
parent 484c2a697b
commit 95f510e724
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ 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 * sizeof(char));
char *buffer = scalloc(buffer_size);
/* We need to use an additional pointer, because iconv() modifies it */
char *output = buffer;