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

Re: projected life of the ext2 filesystem format

> > Personally, I don't see why we can't just consider those times as unsigned.
> > How reliable, portable, etc. is the use of negative time_t?
> time_t foo, bar, baz;
> foo = 10;
> bar = 20;
> baz = foo - bar;

If you're specifically looking for a difference, then do:

time_t foo,bar;
int    baz;
foo = 10;
bar = 20;
baz = foo-bar;

This is the same problem anywhere you're working with numbers.  Leaving
them signed just has the opposite problem of wrapping when you don't
expect it.

                                 ( bcwhite@verisim.com )

 Generated by Signify v1.03.  For this and more, visit http://www.verisim.com/

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: