From afaf1e30b26fba5f7b6583f8e46b6859580bc6de Mon Sep 17 00:00:00 2001 From: psychon Date: Thu, 27 Dec 2007 20:58:13 +0000 Subject: [PATCH] Remove third argument of main() According to [1] the three-argument form of main() should be avoided and since we have no reason to use that one, let's avoid it. 1: http://www.gnu.org/software/libc/manual/html_node/Program-Arguments.html git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@907 726aef4b-f618-498e-8847-2d620e286838 --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 36caa98f..7aefe58d 100644 --- a/main.cpp +++ b/main.cpp @@ -57,7 +57,7 @@ void die(int sig) { exit(sig); } -int main(int argc, char** argv, char** envp) { +int main(int argc, char** argv) { CString sConfig; CString sDataDir = ""; @@ -148,7 +148,7 @@ int main(int argc, char** argv, char** envp) { } if ((chdir(ZNC.GetCurPath().c_str()) == -1) - || (execve(*argv, (char *const*)args, envp) == -1)) { + || (execv(*argv, (char *const*)args) == -1)) { CUtils::PrintError("Unable to launch znc [" + CString(strerror(errno)) + "]"); return 1; }