From: Ben Pfaff Date: Wed, 15 Dec 2004 02:32:02 +0000 (+0000) Subject: Fix warnings. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=391b0ad376d5254ff321fe294b93cd5ed616cb96;p=pintos-anon Fix warnings. --- diff --git a/src/userprog/process.c b/src/userprog/process.c index b8d4a14..90ff18b 100644 --- a/src/userprog/process.c +++ b/src/userprog/process.c @@ -320,7 +320,7 @@ load_segment (struct file *file, const struct Elf32_Phdr *phdr) } /* p_offset must point within file. */ - if (phdr->p_offset < 0 || phdr->p_offset > file_length (file)) + if (phdr->p_offset > (Elf32_Off) file_length (file)) { printf ("bad p_offset %"PE32Ox, phdr->p_offset); return false;