From ace25a78d9e08e21bba4982fad7c8fe898918e75 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 13 Nov 2019 14:01:25 -0600 Subject: [PATCH] include/cxx/ctime: Remove gititimer and setitimer. These are prototyped in sys/time.h, not time.h. Alternatively, ctime could include sys/time.h. Those APIs should also be in the std namespace. --- include/cxx/ctime | 2 -- libs/libc/stdio/lib_getdelim.c | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/cxx/ctime b/include/cxx/ctime index 1933675c8a..18fdded561 100644 --- a/include/cxx/ctime +++ b/include/cxx/ctime @@ -65,8 +65,6 @@ namespace std using ::timer_settime; using ::timer_gettime; using ::timer_getoverrun; - using ::getitimer; - using ::setitimer; } #endif // __INCLUDE_CXX_CTIME diff --git a/libs/libc/stdio/lib_getdelim.c b/libs/libc/stdio/lib_getdelim.c index 14168a24f5..0a1d608126 100644 --- a/libs/libc/stdio/lib_getdelim.c +++ b/libs/libc/stdio/lib_getdelim.c @@ -179,9 +179,9 @@ ssize_t getdelim(FAR char **lineptr, size_t *n, int delimiter, { FAR char *newbuffer; - /* This function should fail with EOVERFLOW if bufize exeeds - * SSIZE_MAX. However, I think we will have crashed long before - * that occurs. + /* This function should fail with EOVERFLOW if ncopied exceeds + * SSIZE_MAX. However, I think we will have failed a memory + * allocation or crashed long before that could occur. */ bufsize += BUFSIZE_INCR; @@ -250,7 +250,7 @@ errout: * * NOTE: Because of this functional definition, getline() will not work * with on systems where multiple characters are used to denote the end - * of line such a CR-LF sequences. In that case, the CR will be + * of line such a CR-LF sequences. In that case, the CR would be * transferred into the user buffer. * ****************************************************************************/