forked from len0rd/rockbox
Remove workaround for broken ARM memset.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9520 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
872797be0e
commit
63b3b0c024
1 changed files with 3 additions and 19 deletions
|
|
@ -630,25 +630,9 @@ void *(Z_Calloc)(size_t n1, size_t n2, int tag, void **user
|
||||||
, const char *file, int line
|
, const char *file, int line
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{ void* s;
|
{
|
||||||
|
return
|
||||||
/* The ARM version of memset doesn't correctly return a pointer
|
(n1*=n2) ? memset((Z_Malloc)(n1, tag, user DA(file, line)), 0, n1) : NULL;
|
||||||
to the memory address being set, so we have to do this the long
|
|
||||||
way... Revert this when the ARM memset is fixed.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if 1
|
|
||||||
if (n1*=n2) {
|
|
||||||
s = (Z_Malloc)(n1,tag,user DA(file,line));
|
|
||||||
memset(s, 0, n1);
|
|
||||||
return s;
|
|
||||||
} else {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
return (n1*=n2) ? memset((Z_Malloc)(n1, tag, user DA(file, line)), 0, n1) : NULL;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char *(Z_Strdup)(const char *s, int tag, void **user
|
char *(Z_Strdup)(const char *s, int tag, void **user
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue