diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-02-12 18:22:04 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-02-12 18:22:04 +0000 |
commit | 64b14130440aee41917ca52775d08f7a2a3b2414 (patch) | |
tree | 525af120fa6c096635947c21eacad1eeb1328a74 /src/configreader.cpp | |
parent | ed7219d6bf051a5a6e4a7cc69178be3680308c69 (diff) |
Fix odd warnings from propolice.
Obviously this isnt valid for it: char b[MAXBUF]; getcwd(b, MAXBUF)..... it demands that b be 1024 in length. odd.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6577 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r-- | src/configreader.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index feb55b293..90719afa7 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -1499,12 +1499,12 @@ char* ServerConfig::CleanFilename(char* name) bool ServerConfig::DirValid(const char* dirandfile) { - char work[MAXBUF]; - char buffer[MAXBUF]; - char otherdir[MAXBUF]; + char work[1024]; + char buffer[1024]; + char otherdir[1024]; int p; - strlcpy(work, dirandfile, MAXBUF); + strlcpy(work, dirandfile, 1024); p = strlen(work); // we just want the dir @@ -1520,13 +1520,13 @@ bool ServerConfig::DirValid(const char* dirandfile) } // Get the current working directory - if (getcwd(buffer, MAXBUF ) == NULL ) + if (getcwd(buffer, 1024 ) == NULL ) return false; if (chdir(work) == -1) return false; - if (getcwd(otherdir, MAXBUF ) == NULL ) + if (getcwd(otherdir, 1024 ) == NULL ) return false; if (chdir(buffer) == -1) @@ -1553,12 +1553,12 @@ bool ServerConfig::DirValid(const char* dirandfile) std::string ServerConfig::GetFullProgDir(char** argv, int argc) { - char work[MAXBUF]; - char buffer[MAXBUF]; - char otherdir[MAXBUF]; + char work[1024]; + char buffer[1024]; + char otherdir[1024]; int p; - strlcpy(work,argv[0],MAXBUF); + strlcpy(work,argv[0],1024); p = strlen(work); // we just want the dir @@ -1574,13 +1574,13 @@ std::string ServerConfig::GetFullProgDir(char** argv, int argc) } // Get the current working directory - if (getcwd(buffer, MAXBUF) == NULL) + if (getcwd(buffer, 1024) == NULL) return ""; if (chdir(work) == -1) return ""; - if (getcwd(otherdir, MAXBUF) == NULL) + if (getcwd(otherdir, 1024) == NULL) return ""; if (chdir(buffer) == -1) |