delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/06/19/18:05:48

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200106192205.AAA19051@father.ludd.luth.se>
Subject: Casting left side to unsigned or right side to signed?
To: djgpp-workers AT delorie DOT com (DJGPP-WORKERS)
Date: Wed, 20 Jun 2001 00:05:44 +0200 (MET DST)
X-Mailer: ELM [version 2.4ME+ PL54 (25)]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

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?


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019