Diff for /libaitcfg/src/aitcfg.c between versions 1.16.6.1 and 1.16.6.2

version 1.16.6.1, 2025/08/19 10:42:28 version 1.16.6.2, 2025/08/19 11:06:32
Line 165  cfgEndConfig(cfg_root_t **pcfg) Line 165  cfgEndConfig(cfg_root_t **pcfg)
 cfg_root_t *  cfg_root_t *
 cfgInitConfigExt(cfg_root_t * __restrict cfg)  cfgInitConfigExt(cfg_root_t * __restrict cfg)
 {  {
        if (!TAILQ_EMPTY(cfg) || !RB_EMPTY(cfg))        pthread_mutex_t mtx = { 0 };
 
         if (!TAILQ_EMPTY(cfg) || !RB_EMPTY(cfg) ||
                         memcmp(&cfg->rc_mtx, &mtx, sizeof mtx))
                 cfgUnloadConfig(cfg);                  cfgUnloadConfig(cfg);
   
         memset(cfg, 0, sizeof(cfg_root_t));          memset(cfg, 0, sizeof(cfg_root_t));
Line 189  cfgLoadConfig(const char *cfgName, cfg_root_t * __rest Line 192  cfgLoadConfig(const char *cfgName, cfg_root_t * __rest
 {  {
         FILE *f;          FILE *f;
         int ret;          int ret;
           pthread_mutex_t mtx = { 0 };
   
         if (!cfgName || !cfg) {          if (!cfgName || !cfg) {
                 cfg_SetErr(EINVAL, "Invalid parameter(s)");                  cfg_SetErr(EINVAL, "Invalid parameter(s)");
                 return -1;                  return -1;
         } else {          } else {
                if (!TAILQ_EMPTY(cfg) || !RB_EMPTY(cfg))                if (!TAILQ_EMPTY(cfg) || !RB_EMPTY(cfg) ||
                                 memcmp(&cfg->rc_mtx, &mtx, sizeof mtx))
                         cfgUnloadConfig(cfg);                          cfgUnloadConfig(cfg);
   
                 memset(cfg, 0, sizeof(cfg_root_t));                  memset(cfg, 0, sizeof(cfg_root_t));

Removed from v.1.16.6.1  
changed lines
  Added in v.1.16.6.2


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