1
0
Fork 0
forked from len0rd/rockbox

asap codec: remove invalid memset

This would zero the first 4 or 8 bytes of the array because it is declared as a pointer

rockbox/lib/rbcodec/codecs/libasap/asap.c:1229:44: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
    memset(ast -> memory, 0, sizeof(ast -> memory));
           ~~~~~~~~~~~~~            ~~~~~~~^~~~~~
This commit is contained in:
Rafaël Carré 2012-05-06 23:38:15 -04:00
parent 06c8ab852b
commit 5aadf87e98

View file

@ -1226,7 +1226,6 @@ PRIVATE FUNC(abool, parse_sap, (
return FALSE; return FALSE;
if (ast == NULL) if (ast == NULL)
return TRUE; return TRUE;
ZERO_ARRAY(ast _ memory);
module_index = module_info _ header_len + 2; module_index = module_info _ header_len + 2;
while (module_index + 5 <= module_len) { while (module_index + 5 <= module_len) {
V(int, start_addr) = UWORD(module, module_index); V(int, start_addr) = UWORD(module, module_index);