Re: [Linux-ia64] correct seg fault address on ia-64??

From: Andreas Schwab <schwab_at_suse.de>
Date: 2001-11-15 03:45:27
"Pereira, D LailaX E" <d.lailax.e.pereira@intel.com> writes:

|>  /* Align to a multiple of page_size, assumed to be a power of two */
|>   x = (int *)((long)(((int) (long)x + page_size-1) & ~(page_size-1)));

Never ever cast pointers to int!  Modern C gives you all you need:
uintptr_t.

Andreas.

-- 
Andreas Schwab                                  "And now for something
Andreas.Schwab@suse.de				completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
Received on Wed Nov 14 08:45:44 2001

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:05 EST