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/02/19 18:45:50 UTC

[incubator-nuttx] branch pr316 updated: stdio/getline: correct the character slash

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

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


The following commit(s) were added to refs/heads/pr316 by this push:
     new 2ad5780  stdio/getline: correct the character slash
2ad5780 is described below

commit 2ad5780ae6467e0d5f3470da14224dcb60349ee9
Author: chao.an <an...@xiaomi.com>
AuthorDate: Sun Feb 16 22:04:17 2020 +0800

    stdio/getline: correct the character slash
    
    Change-Id: I84ddd3c88f6a9e72860e9f1214ce816851aa6a9f
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 libs/libc/stdio/lib_getdelim.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libs/libc/stdio/lib_getdelim.c b/libs/libc/stdio/lib_getdelim.c
index 0a1d608..4b63da1 100644
--- a/libs/libc/stdio/lib_getdelim.c
+++ b/libs/libc/stdio/lib_getdelim.c
@@ -55,10 +55,10 @@
 #undef HAVE_GETLINE
 #if defined(CONFIG_EOL_IS_CR)
 #  define HAVE_GETLINE 1
-#  define EOLCH        '/r'
+#  define EOLCH        '\r'
 #elif defined(CONFIG_EOL_IS_LF)
 #  define HAVE_GETLINE 1
-#  define EOLCH        '/n'
+#  define EOLCH        '\n'
 #endif
 
 #define BUFSIZE_INIT   64