Diff for /libaitcfg/src/parse.c between versions 1.19 and 1.20

version 1.19, 2021/11/26 01:15:03 version 1.20, 2022/12/05 22:31:12
Line 69  cfgReadConfig(FILE *f, cfg_root_t * __restrict cfg) Line 69  cfgReadConfig(FILE *f, cfg_root_t * __restrict cfg)
   
         while (!feof(f)) {          while (!feof(f)) {
                 memset(line, 0, sizeof line);                  memset(line, 0, sizeof line);
                fgets(line, sizeof line - 1, f);                if (!fgets(line, sizeof(line) - 1, f))
                         break;
 #ifdef SUPPORT_USER_EOF  #ifdef SUPPORT_USER_EOF
                 /* check for user end-of-file */                  /* check for user end-of-file */
                 if (line[0] == '.' && line[1] == '\n')                  if (line[0] == '.' && line[1] == '\n')
Line 447  cfgReadLines(FILE *f, const char *delim, const char *e Line 448  cfgReadLines(FILE *f, const char *delim, const char *e
         while (!feof(f)) {          while (!feof(f)) {
                 psSec = psAttr = psVal = NULL;                  psSec = psAttr = psVal = NULL;
                 memset(line, 0, sizeof line);                  memset(line, 0, sizeof line);
                fgets(line, sizeof line - 1, f);                if (!fgets(line, sizeof(line) - 1, f))
                         break;
                 /* check for user end-of-file */                  /* check for user end-of-file */
                 if (strspn(line, end))                  if (strspn(line, end))
                         break;                          break;

Removed from v.1.19  
changed lines
  Added in v.1.20


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>