Skip to content

Commit 6e212a3

Browse files
committed
fix to the add_millis helper reseting the total number of seconds
1 parent 5cbb285 commit 6e212a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/miri/tests/pass-dep/libc/libc-time.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ mod test_clock_nanosleep {
360360
fn add_100_millis(mut ts: libc::timespec) -> libc::timespec {
361361
const SECOND: i64 = 1_000_000_000;
362362
ts.tv_nsec += SECOND / 10;
363-
ts.tv_sec = ts.tv_nsec / SECOND;
363+
ts.tv_sec += ts.tv_nsec / SECOND;
364364
ts.tv_nsec %= SECOND;
365365
ts
366366
}

0 commit comments

Comments
 (0)