You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/04/21 23:20:02 UTC

[incubator-nuttx] 01/06: libc: audio: nxstyle fixes

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 76c47f6b21307ffca3a6110a57d1fde43c07ebb9
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Tue Apr 21 10:55:41 2020 +0200

    libc: audio: nxstyle fixes
    
    This change is needed to be able to fix the warnings on the audio core
    and includes the propagation of the fix in the audio.
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 audio/audio.c                | 6 +++---
 audio/audio_comp.c           | 2 +-
 include/nuttx/audio/audio.h  | 4 ++--
 libs/libc/audio/lib_buffer.c | 6 +++---
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/audio/audio.c b/audio/audio.c
index 716a1ac..c19973c 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -556,8 +556,8 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
             {
               /* Perform a simple apb_free operation */
 
-              DEBUGASSERT(bufdesc->u.pBuffer != NULL);
-              apb_free(bufdesc->u.pBuffer);
+              DEBUGASSERT(bufdesc->u.buffer != NULL);
+              apb_free(bufdesc->u.buffer);
               ret = sizeof(struct audio_buf_desc_s);
             }
         }
@@ -575,7 +575,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
           DEBUGASSERT(lower->ops->enqueuebuffer != NULL);
 
           bufdesc = (FAR struct audio_buf_desc_s *) arg;
-          ret = lower->ops->enqueuebuffer(lower, bufdesc->u.pBuffer);
+          ret = lower->ops->enqueuebuffer(lower, bufdesc->u.buffer);
         }
         break;
 
diff --git a/audio/audio_comp.c b/audio/audio_comp.c
index 494de48..5f9b3e2 100644
--- a/audio/audio_comp.c
+++ b/audio/audio_comp.c
@@ -597,7 +597,7 @@ static int audio_comp_freebuffer(FAR struct audio_lowerhalf_s *dev,
 
   if (ret == -ENOTTY)
     {
-      apb_free(bufdesc->u.pBuffer);
+      apb_free(bufdesc->u.buffer);
       ret = sizeof(*bufdesc);
     }
 
diff --git a/include/nuttx/audio/audio.h b/include/nuttx/audio/audio.h
index 5be6431..3a364f7 100644
--- a/include/nuttx/audio/audio.h
+++ b/include/nuttx/audio/audio.h
@@ -465,8 +465,8 @@ struct audio_buf_desc_s
   uint16_t            numbytes;           /* Number of bytes to allocate */
   union
   {
-    FAR struct ap_buffer_s  *pBuffer;     /* Buffer to free / enqueue */
-    FAR struct ap_buffer_s  **ppBuffer;   /* Pointer to receive allocated buffer */
+    FAR struct ap_buffer_s  *buffer;     /* Buffer to free / enqueue */
+    FAR struct ap_buffer_s  **pbuffer;   /* Pointer to receive allocated buffer */
   } u;
 };
 
diff --git a/libs/libc/audio/lib_buffer.c b/libs/libc/audio/lib_buffer.c
index 88fd735..712b321 100644
--- a/libs/libc/audio/lib_buffer.c
+++ b/libs/libc/audio/lib_buffer.c
@@ -104,17 +104,17 @@ int apb_alloc(FAR struct audio_buf_desc_s *bufdesc)
   int                 ret;
   struct ap_buffer_s  *apb;
 
-  DEBUGASSERT(bufdesc->u.ppBuffer != NULL);
+  DEBUGASSERT(bufdesc->u.pbuffer != NULL);
 
   /* Perform a user mode allocation */
 
   bufsize = sizeof(struct ap_buffer_s) + bufdesc->numbytes;
   apb = lib_umalloc(bufsize);
-  *bufdesc->u.ppBuffer = apb;
+  *bufdesc->u.pbuffer = apb;
 
   /* Test if the allocation was successful or not */
 
-  if (*bufdesc->u.ppBuffer == NULL)
+  if (*bufdesc->u.pbuffer == NULL)
     {
       ret = -ENOMEM;
     }