mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +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:
+1
-2
@@ -930,8 +930,7 @@ int audio_register(FAR const char *name, FAR struct audio_lowerhalf_s *dev)
|
||||
|
||||
/* Allocate the upper-half data structure */
|
||||
|
||||
upper = (FAR struct audio_upperhalf_s *)kmm_zalloc(
|
||||
sizeof(struct audio_upperhalf_s));
|
||||
upper = kmm_zalloc(sizeof(struct audio_upperhalf_s));
|
||||
if (!upper)
|
||||
{
|
||||
auderr("ERROR: Allocation failed\n");
|
||||
|
||||
+1
-1
@@ -1388,7 +1388,7 @@ FAR struct audio_lowerhalf_s *
|
||||
|
||||
/* Allocate an instance of our private data structure */
|
||||
|
||||
priv = (FAR struct pcm_decode_s *)kmm_zalloc(sizeof(struct pcm_decode_s));
|
||||
priv = kmm_zalloc(sizeof(struct pcm_decode_s));
|
||||
if (!priv)
|
||||
{
|
||||
auderr("ERROR: Failed to allocate driver structure\n");
|
||||
|
||||
Reference in New Issue
Block a user