diff --git a/userprog/syscall_exit.c b/userprog/syscall_exit.c
index 3109de5b45953bae32f75ddd27790c5f7bfececc..df33e356d6294b25294b2d02dec16c7870b2a3f8 100644
--- a/userprog/syscall_exit.c
+++ b/userprog/syscall_exit.c
@@ -12,13 +12,9 @@
 #include "threads/thread.h" // Dependency for thread struct
 
 void syscall_exit(struct intr_frame *f) {
-	struct thread *current_thread;	// creates thread struct from thread.h
-	current_thread = thread_current(); // Sets current thread
-
+	struct thread *current_thread = thread_current(); // Sets current thread
 	// pop off first int argument from interrupt frame
 	int exit_code = *((int*)f->esp + 1);
 	current_thread->exit_code = exit_code; // Returns exit code to kernel
-
 	thread_exit(); // Exiting current thread
-	f->eax = -1; // Returning -1 for success
 }
\ No newline at end of file
diff --git a/userprog/system_calls.h b/userprog/system_calls.h
index daed0eda12434a3bebc1b41db4999e293cb1ebed..6fadcd1f7e3d556e4884521bb746da97de11b6e0 100644
--- a/userprog/system_calls.h
+++ b/userprog/system_calls.h
@@ -12,7 +12,7 @@ void syscall_halt(struct intr_frame *f);
  * returned. Conventionally, a status of 0 indicates success and nonzero
  * values indicate errors. 
  */
-void syscall_exit(struct intr_frame *status);
+void syscall_exit(struct intr_frame *f);
 
 /*
  * Runs the executable whose name is given in cmd_line, passing any given