Page MenuHomeFreeBSD

diff: Fix mtime of file1 in -u/-c header line.
ClosedPublic

Authored by jilles on Mar 25 2017, 10:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 21, 1:42 AM
Unknown Object (File)
Fri, Nov 21, 1:31 AM
Unknown Object (File)
Fri, Nov 21, 1:21 AM
Unknown Object (File)
Fri, Nov 21, 1:17 AM
Unknown Object (File)
Tue, Nov 4, 3:56 AM
Unknown Object (File)
Oct 28 2025, 8:06 AM
Unknown Object (File)
Oct 26 2025, 9:46 AM
Unknown Object (File)
Oct 26 2025, 9:46 AM
Subscribers

Details

Summary

Calling localtime() a second time overwrites the result of the first call.
Use localtime_r() instead.

PR: 218018

Test Plan

A new test case is included.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningusr.bin/diff/tests/diff_test.sh:CHMOD1Invalid Executable
Unit
No Test Coverage
Build Status
Buildable 8292
Build 8541: CI src buildJenkins
Build 8540: arc lint + arc unit

Event Timeline

Fixing the nanoseconds (also PR 218018) will be a separate diff.

This revision is now accepted and ready to land.Mar 25 2017, 11:48 PM
This revision was automatically updated to reflect the committed changes.