Reformat start_process stack initialization code to follow style

This commit is contained in:
Themis Demetriades
2024-11-04 00:04:08 +00:00
parent 34d6c15d73
commit 92c681ff02

View File

@@ -83,16 +83,16 @@ start_process (void *file_name_)
command line input must fit in a page. Also keep track command line input must fit in a page. Also keep track
of pointers to the argument data within a linked list. */ of pointers to the argument data within a linked list. */
struct list arg_list; struct list arg_list;
list_init(&arg_list); list_init (&arg_list);
unsigned int arg_count = 1; unsigned int arg_count = 1;
while (arg != NULL) while (arg != NULL)
{ {
size_t arg_size = (strlen(arg) + 1) * sizeof (char); size_t arg_size = (strlen (arg) + 1) * sizeof (char);
if_.esp -= arg_size; if_.esp -= arg_size;
memcpy (if_.esp, arg, arg_size); memcpy (if_.esp, arg, arg_size);
struct arg_elem *arg_elem = malloc(sizeof (struct arg_elem)); struct arg_elem *arg_elem = malloc (sizeof (struct arg_elem));
ASSERT (arg_elem != NULL); ASSERT (arg_elem != NULL);
arg_elem->arg = arg; arg_elem->arg = arg;
list_push_front (&arg_list, &arg_elem->elem); list_push_front (&arg_list, &arg_elem->elem);