summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd/godot_linuxbsd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linuxbsd/godot_linuxbsd.cpp')
-rw-r--r--platform/linuxbsd/godot_linuxbsd.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/platform/linuxbsd/godot_linuxbsd.cpp b/platform/linuxbsd/godot_linuxbsd.cpp
index 76d579dd53..efad9c8594 100644
--- a/platform/linuxbsd/godot_linuxbsd.cpp
+++ b/platform/linuxbsd/godot_linuxbsd.cpp
@@ -28,6 +28,10 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
+#include "os_linuxbsd.h"
+
+#include "main/main.h"
+
#include <limits.h>
#include <locale.h>
#include <stdlib.h>
@@ -37,9 +41,6 @@
#include <sys/resource.h>
#endif
-#include "main/main.h"
-#include "os_linuxbsd.h"
-
int main(int argc, char *argv[]) {
#if defined(SANITIZERS_ENABLED)
// Note: Set stack size to be at least 30 MB (vs 8 MB default) to avoid overflow, address sanitizer can increase stack usage up to 3 times.
@@ -55,7 +56,7 @@ int main(int argc, char *argv[]) {
TEST_MAIN_OVERRIDE
char *cwd = (char *)malloc(PATH_MAX);
- ERR_FAIL_COND_V(!cwd, ERR_OUT_OF_MEMORY);
+ ERR_FAIL_NULL_V(cwd, ERR_OUT_OF_MEMORY);
char *ret = getcwd(cwd, PATH_MAX);
Error err = Main::setup(argv[0], argc - 1, &argv[1]);