You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/10/06 08:45:06 UTC

[incubator-nuttx] branch master updated: drivers: note: Fix compile errors in noteram_driver.c

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 822497d  drivers: note: Fix compile errors in noteram_driver.c
822497d is described below

commit 822497d021a59e2749ee56a3b90a924ff8563a46
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Tue Oct 6 15:23:58 2020 +0900

    drivers: note: Fix compile errors in noteram_driver.c
    
    Summary:
    - This commit fixes compile errors if CONFIG_DEBUG_ASSERTIONS=y
    
    Impact:
    - Affects noteram_driver only
    
    Testing:
    - Tested with spresense:wifi_smp with CONFIG_DEBUG_ASSERTIONS=y
    
    Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
 drivers/note/noteram_driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/note/noteram_driver.c b/drivers/note/noteram_driver.c
index 0f9306b..9f6cb05 100644
--- a/drivers/note/noteram_driver.c
+++ b/drivers/note/noteram_driver.c
@@ -310,7 +310,7 @@ static ssize_t noteram_get(FAR uint8_t *buffer, size_t buflen)
   /* Get the read index of the circular buffer */
 
   read    = g_noteram_info.ni_read;
-  DEBUGASSERT(tail < CONFIG_DRIVER_NOTERAM_BUFSIZE);
+  DEBUGASSERT(read < CONFIG_DRIVER_NOTERAM_BUFSIZE);
 
   /* Get the length of the note at the read index */
 
@@ -392,7 +392,7 @@ static ssize_t noteram_size(void)
   /* Get the read index of the circular buffer */
 
   read = g_noteram_info.ni_read;
-  DEBUGASSERT(read < CONFIG_SCHED_NOTE_BUFSIZE);
+  DEBUGASSERT(read < CONFIG_DRIVER_NOTERAM_BUFSIZE);
 
   /* Get the length of the note at the read index */