Remove casting of return value from *alloc() functions.
[platform/upstream/flac.git] / src / plugin_common / tags.c
index 85ef499..9b7658f 100644 (file)
@@ -128,7 +128,7 @@ static FLAC__uint16 *local__convert_utf8_to_ucs2(const char *src, unsigned lengt
        }
 
        /* allocate */
-       out = (FLAC__uint16*)safe_malloc_mul_2op_(chars, /*times*/sizeof(FLAC__uint16));
+       out = safe_malloc_mul_2op_(chars, /*times*/sizeof(FLAC__uint16));
        if (0 == out) {
                FLAC__ASSERT(0);
                return 0;
@@ -193,7 +193,7 @@ static char *local__convert_ucs2_to_utf8(const FLAC__uint16 *src, unsigned lengt
        }
 
        /* allocate */
-       out = (char*)safe_malloc_mul_2op_(len, /*times*/sizeof(char));
+       out = safe_malloc_mul_2op_(len, /*times*/sizeof(char));
        if (0 == out)
                return 0;
 
@@ -316,7 +316,7 @@ FLAC__bool FLAC_plugin__tags_add_tag_utf8(FLAC__StreamMetadata *tags, const char
                const size_t value_len = strlen(value);
                const size_t separator_len = strlen(separator);
                FLAC__byte *new_entry;
-               if(0 == (new_entry = (FLAC__byte*)safe_realloc_add_4op_(entry->entry, entry->length, /*+*/value_len, /*+*/separator_len, /*+*/1)))
+               if(0 == (new_entry = safe_realloc_add_4op_(entry->entry, entry->length, /*+*/value_len, /*+*/separator_len, /*+*/1)))
                        return false;
                memcpy(new_entry+entry->length, separator, separator_len);
                entry->length += separator_len;