Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: xsrc/external/mit/xterm/dist



    Date:        Sun, 16 May 2021 16:32:55 +1000
    From:        Simon Burge <simonb%NetBSD.org@localhost>
    Message-ID:  <20210516063255.13F704E23A%thoreau.thistledown.com.au@localhost>

  | Roland Illig wrote:
  | > therefore I did it this way, for consistency.
  |
  | Good reason :)

Actually, it isn't.  Consistency is good,
but correctness is better.  Both is better
still.  It is possible that unsigned long
is 32 bits, and size_t is 64, in which case
casting to unsigned long risks truncating
the value.  That might not be possible in
the cases in question, but why risk it?
Always use the z modifier to print size_t.

kre


Home | Main Index | Thread Index | Old Index