/[svn]/ircd-hybrid/branches/8.2.x/src/conf_db.c
ViewVC logotype

Diff of /ircd-hybrid/branches/8.2.x/src/conf_db.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 8605 by michael, Tue Feb 20 19:30:33 2018 UTC revision 8606 by michael, Sun Oct 28 19:56:32 2018 UTC
# Line 93  static struct dbFILE * Line 93  static struct dbFILE *
93  open_db_read(const char *filename)  open_db_read(const char *filename)
94  {  {
95    struct dbFILE *f = xcalloc(sizeof(*f));    struct dbFILE *f = xcalloc(sizeof(*f));
   FILE *fp = NULL;  
96    
97    strlcpy(f->filename, filename, sizeof(f->filename));    strlcpy(f->filename, filename, sizeof(f->filename));
98    
99    f->mode = 'r';    f->mode = 'r';
100    fp = fopen(f->filename, "rb");    f->fp = fopen(f->filename, "rb");
101    
102    if (!fp)    if (f->fp == NULL)
103    {    {
104      int errno_save = errno;      int errno_save = errno;
105    
# Line 112  open_db_read(const char *filename) Line 111  open_db_read(const char *filename)
111      return NULL;      return NULL;
112    }    }
113    
   f->fp = fp;  
114    return f;    return f;
115  }  }
116    

Legend:
Removed from v.8605  
changed lines
  Added in v.8606

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28