Re: [PATCH 1/1] Fix date checking in case if time was not initialized.

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

 



Mike Gorchak <mike.gorchak.qnx@xxxxxxxxx> writes:

> 	if (tm->tm_hour < 0 || tm->tm_min < 0 || tm->tm_sec < 0)
> 		return -1;
>
> So is_date() always return negative result for the text string where
> date is placed before time like '2008-02-14 20:30:45'.

Yes, it returns this -1 on other platforms, but...

> It must fail on
> other platforms as well.

... the input '2008-02-14 20:30:45' still parses fine for others
(including me).  That is what is puzzling.

A shot in the dark: perhaps your time_t is unsigned?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]