Diff for /libaitcfg/src/parse.c between versions 1.16 and 1.17

version 1.16, 2017/06/28 15:13:03 version 1.17, 2017/06/30 08:44:44
Line 56  SUCH DAMAGE. Line 56  SUCH DAMAGE.
 int  int
 cfgReadConfig(FILE *f, cfg_root_t * __restrict cfg)  cfgReadConfig(FILE *f, cfg_root_t * __restrict cfg)
 {  {
        char line[BUFSIZ];        char line[BUFSIZ], origin[BUFSIZ];
         struct tagCfg *av = NULL;          struct tagCfg *av = NULL;
         int flg = 0;          int flg = 0;
         char *psAttr, *psVal, szSection[STRSIZ] = { 0 };          char *psAttr, *psVal, szSection[STRSIZ] = { 0 };
Line 79  cfgReadConfig(FILE *f, cfg_root_t * __restrict cfg) Line 79  cfgReadConfig(FILE *f, cfg_root_t * __restrict cfg)
                         continue;                          continue;
                 } else {                  } else {
                         *psAttr = 0;                          *psAttr = 0;
                           strlcpy(origin, line, sizeof origin);
                         str_Trim(line);                          str_Trim(line);
                 }                  }
   
Line 137  cfgReadConfig(FILE *f, cfg_root_t * __restrict cfg) Line 138  cfgReadConfig(FILE *f, cfg_root_t * __restrict cfg)
                 }                  }
                 /* parse pair */                  /* parse pair */
                 if (!(psAttr = strchr(line, '='))) {                  if (!(psAttr = strchr(line, '='))) {
                        AIT_SET_STR(&av->cfg_val, line);                        AIT_SET_STR(&av->cfg_val, origin);
                         EDEBUG(7, "Ignore a/v '%s' ... not found '='", line);                          EDEBUG(7, "Ignore a/v '%s' ... not found '='", line);
                         continue;                          continue;
                 } else {                  } else {

Removed from v.1.16  
changed lines
  Added in v.1.17


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