Date: Wed, 20 Jun 2001 11:01:23 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: Martin Str|mberg Message-Id: <8361-Wed20Jun2001110123+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com In-reply-to: <200106192205.AAA19051@father.ludd.luth.se> (message from Martin Str|mberg on Wed, 20 Jun 2001 00:05:44 +0200 (MET DST)) Subject: Re: Casting left side to unsigned or right side to signed? References: <200106192205 DOT AAA19051 AT father DOT ludd DOT luth DOT se> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: Martin Str|mberg > Date: Wed, 20 Jun 2001 00:05:44 +0200 (MET DST) > > Fragment from dos/process/chkv2prg.c: > > unsigned long exe_start; > > ... > exe_start = (unsigned long)header[4]*16L; > if (lseek(pf, exe_start, SEEK_SET) != exe_start) > return NULL; > > Which way is best to go? Casting left side to unsigned or right side > to signed? I think we should simply declare exe_start as off_t. (Please leave the cast of header[4] in place, though.)