[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test-fdutimensat racy?
From: |
Pádraig Brady |
Subject: |
Re: test-fdutimensat racy? |
Date: |
Wed, 05 Jun 2013 10:16:33 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 06/05/2013 08:37 AM, Bernhard Voelker wrote:
> /* Return the greater of the ctime and the mtime differences, or
> zero if it cannot be determined, or INT_MAX if either overflows. */
> - cdiff = diff_timespec (get_stat_ctime (st), get_stat_ctime (&old_st));
> - if (cdiff != 0)
> - {
> - mdiff = diff_timespec (get_stat_mtime (st), get_stat_mtime (&old_st));
> - if (mdiff != 0)
> - return cdiff < mdiff ? mdiff : cdiff;
> - }
> - return 0;
> + if ( diff_timespec (get_stat_ctime (&st), get_stat_ctime (&old_st))
> + && diff_timespec (get_stat_mtime (&st), get_stat_mtime (&old_st)))
> + return true;
I adjusted this stale comment and pushed.
thanks!
Pádraig.