From 391b0ad376d5254ff321fe294b93cd5ed616cb96 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 15 Dec 2004 02:32:02 +0000 Subject: [PATCH] Fix warnings. --- src/userprog/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2