diff options
| author | Carlos Montiers <carlos@thefunsouth.com> | 2014-11-23 01:51:38 -0300 |
|---|---|---|
| committer | Carlos Montiers <carlos@thefunsouth.com> | 2014-11-23 01:51:38 -0300 |
| commit | 9b14e8715a74374107fe8d2d74d2e7014b3b0669 (patch) | |
| tree | 9e5480cf0d8f17166bfa5bba9a05bbd6d60ab203 /win32 | |
| parent | f40b82295ec3d4cb35d2b660880fee768aee0299 (diff) | |
| download | tinycc-9b14e8715a74374107fe8d2d74d2e7014b3b0669.tar.gz tinycc-9b14e8715a74374107fe8d2d74d2e7014b3b0669.tar.bz2 | |
little optimization to crt1
Diffstat (limited to 'win32')
| -rw-r--r-- | win32/lib/crt1.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/win32/lib/crt1.c b/win32/lib/crt1.c index eb2a7b5..aa7a01f 100644 --- a/win32/lib/crt1.c +++ b/win32/lib/crt1.c @@ -26,7 +26,7 @@ int main(int argc, char **argv, char **env); int _start(void) { __TRY__ - int argc; char **argv; char **env; int ret; + int argc; char **argv; char **env; _startupinfo start_info = {0}; _controlfp(0x10000, 0x30000); @@ -35,13 +35,14 @@ int _start(void) argv = NULL; __getmainargs(&argc, &argv, &env, 0, &start_info); // check success comparing if argv now is not NULL - if (! argv) + if (argv != NULL) + { + exit( main(argc, argv, env) ); + } + else { ExitProcess(-1); } - - ret = main(argc, argv, env); - exit(ret); } // ============================================= |
