[BACK]Return to config.c CVS log [TXT][DIR] Up to [local] / blind

Diff for /blind/config.c between version 1.1 and 1.2

version 1.1, 2022/03/17 21:15:43 version 1.2, 2022/03/18 20:54:01
Line 15 
Line 15 
  */   */
   
 #include <stdlib.h>  #include <stdlib.h>
   #include <string.h>
   
 #include "blind.h"  #include "blind.h"
   #include "log.h"
   
 struct blind * config_init(void);  struct blind * config_init(void);
   
Line 28  config_init(void)
Line 30  config_init(void)
         if ((cfg = calloc(1, sizeof(*cfg))) == NULL)          if ((cfg = calloc(1, sizeof(*cfg))) == NULL)
                 return cfg;                  return cfg;
   
           if (strlcpy(cfg->bl_conf, BL_CONF, PATH_MAX) >= PATH_MAX)
                   log_fatal("config file exceeds PATH_MAX");
   
           if (strlcpy(cfg->bl_sock, BL_SOCK, PATH_MAX) >= PATH_MAX)
                   log_fatal("socket file exceeds PATH_MAX");
   
         cfg->bl_ttl = BL_TTL;          cfg->bl_ttl = BL_TTL;
   
         return cfg;          return cfg;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

https://cvs.kroczynski.net