From 2348319a69dcf7bcb37a75709959d9958ec32bcf Mon Sep 17 00:00:00 2001 From: Alex Stratford <alexander3.stratford@live.uwe.ac.uk> Date: Wed, 4 Dec 2019 01:09:28 +0000 Subject: [PATCH] Improved comments --- userprog/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/userprog/syscall.c b/userprog/syscall.c index 98fc8eb..f15f022 100644 --- a/userprog/syscall.c +++ b/userprog/syscall.c @@ -90,7 +90,7 @@ syscall_handler (struct intr_frame *f UNUSED) static struct list *file_list; /* Goes through all the files in the file_list and looks for the given file - * Descriptor. + * Descriptor. Linear search */ void file_search(struct file_map *f) { // Creates a struct to hold the currently checked file @@ -104,7 +104,7 @@ void file_search(struct file_map *f) { (is_tail(list_element) == false) ) { // Swaps the list_element for the next one in place - list_next(list_element); + list_element = list_next(list_element); } // Copies list_element to current file curr_file->list_element = *list_element; -- GitLab