mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
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:
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user