mm/alloc: remove all unnecessary cast for alloc

Fix the minor style issue and remove unnecessary cast

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an
2023-08-28 15:39:47 +08:00
committed by Xiang Xiao
parent db13d5e24c
commit 664927c86e
333 changed files with 485 additions and 566 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ int nxbe_colormap(FAR NX_DRIVERTYPE *dev)
*/
size = 3 * CONFIG_NX_NCOLORS * sizeof(uint8_t);
alloc = (FAR uint8_t *)kmm_malloc(size);
alloc = kmm_malloc(size);
if (alloc == NULL)
{
return -ENOMEM;
+1 -1
View File
@@ -129,7 +129,7 @@ static void nxbe_realloc(FAR struct nxbe_window_s *wnd,
#else
/* Re-allocate memory from the user space heap. */
newfb = (FAR nxgl_mxpixel_t *)kumm_malloc(newfbsize);
newfb = kumm_malloc(newfbsize);
if (newfb == NULL)
{
/* Fall back to no RAM back up */
+1 -1
View File
@@ -61,7 +61,7 @@ void nxmu_kbdin(FAR struct nxmu_state_s *nxmu, uint8_t nch, FAR uint8_t *ch)
*/
size = sizeof(struct nxclimsg_kbdin_s) + nch - 1;
outmsg = (FAR struct nxclimsg_kbdin_s *)kmm_malloc(size);
outmsg = kmm_malloc(size);
if (outmsg)
{
/* Give the keypad input only to the top child */
+1 -1
View File
@@ -132,7 +132,7 @@ void nxmu_openwindow(FAR struct nxbe_state_s *be,
* levels.
*/
wnd->fbmem = (FAR nxgl_mxpixel_t *)kumm_malloc(fbsize);
wnd->fbmem = kumm_malloc(fbsize);
if (wnd->fbmem == NULL)
{
/* Fall back to no RAM back up */