From 9d6aeb92d62bf9045cbafaf30e75ede4fe07ddc9 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 a74a83a..c015dd1 100644 --- a/userprog/syscall.c +++ b/userprog/syscall.c @@ -84,7 +84,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 @@ -98,7 +98,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