getline: add a note, it is not fully POSIX - randomcrap - random crap programs of varying quality
 (HTM) git clone git://git.codemadness.org/randomcrap
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit e37ab5d1e9a0a9b0bfceaa975a4e2716eaf8b6af
 (DIR) parent bd14b9abb41a9a701dcc1068f1949c8a84608933
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Fri, 31 Mar 2023 14:56:08 +0200
       
       getline: add a note, it is not fully POSIX
       
       Diffstat:
         M compat-c/getline.c                  |       2 ++
       
       1 file changed, 2 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/compat-c/getline.c b/compat-c/getline.c
       @@ -10,6 +10,8 @@ getline(char **lineptr, size_t *linesiz, FILE *fp)
        
                while (c != '\n') {
                        if (len + 2 >= *linesiz) {
       +                        /* NOTE: POSIX requires to set an error flag FILE *fp,
       +                           but there is no direct access to it */
                                if (!(p = realloc(p, len + 4096)))
                                        return -1;
                                *lineptr = p;