From 64b14130440aee41917ca52775d08f7a2a3b2414 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 12 Feb 2007 18:22:04 +0000 Subject: 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 --- src/configreader.cpp | 24 ++++++++++++------------ 1 file 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) -- cgit v1.2.3