From 95f510e724ac1fc3611e1b736c7ef367c493af81 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fernando=20Tarl=C3=A1=20Cardoso=20Lemos?= Date: Tue, 21 Feb 2012 14:53:01 -0200 Subject: [PATCH] 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. --- libi3/ucs2_conversion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libi3/ucs2_conversion.c b/libi3/ucs2_conversion.c index 6f7cf287..fe7c2d4c 100644 --- a/libi3/ucs2_conversion.c +++ b/libi3/ucs2_conversion.c @@ -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; -- 2.39.5