summaryrefslogtreecommitdiff
path: root/payloads/libpayload/arch/x86/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/arch/x86/main.c')
-rw-r--r--payloads/libpayload/arch/x86/main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/payloads/libpayload/arch/x86/main.c b/payloads/libpayload/arch/x86/main.c
index fbd4dc4e18..f9a5e2cf83 100644
--- a/payloads/libpayload/arch/x86/main.c
+++ b/payloads/libpayload/arch/x86/main.c
@@ -42,8 +42,8 @@ char *main_argv[MAX_ARGC_COUNT];
* This is our C entry function - set up the system
* and jump into the payload entry point.
*/
-void start_main(void);
-void start_main(void)
+int start_main(void);
+int start_main(void)
{
extern int main(int argc, char **argv);
@@ -67,10 +67,9 @@ void start_main(void)
* In the future we may care about the return value.
*/
- (void) main(main_argc, (main_argc != 0) ? main_argv : NULL);
-
/*
- * Returning here will go to the _leave function to return
+ * Returning from main() will go to the _leave function to return
* us to the original context.
*/
+ return main(main_argc, (main_argc != 0) ? main_argv : NULL);
}