mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user