diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-06 10:03:22 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-06 10:03:22 +0000 |
commit | a519f21f44dbbaf30b90fe44a9a73f930d61c185 (patch) | |
tree | aea82af83a134fbf22592386b8d24f184439fe4b /src | |
parent | 769a14f1b476de7244b6ab275e44164ea938c683 (diff) |
Remove a strcpy
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5433 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/configreader.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index 30e966b94..2c7067127 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -1271,23 +1271,18 @@ bool ServerConfig::ReadFile(file_cache &F, const char* fname) char linebuf[MAXBUF]; F.clear(); - file = fopen(fname,"r"); + file = fopen(fname, "r"); if (file) { while (!feof(file)) { - fgets(linebuf,sizeof(linebuf),file); - linebuf[strlen(linebuf)-1]='\0'; - - if (!*linebuf) - { - strcpy(linebuf," "); - } + fgets(linebuf, sizeof(linebuf), file); + linebuf[strlen(linebuf)-1] = 0; if (!feof(file)) { - F.push_back(linebuf); + F.push_back(*linebuf ? linebuf : " "); } } |