Files
containerd/archive
Sebastiaan van Stijn 0aefb52807 archive: windows: chtimes(): remove redundant conversion
It looks like this function was converting the time (`windows.NsecToTimespec()`),
only to convert it back (`windows.TimespecToNsec()`). This became clear when
moving the lines together:

```go
ctimespec := windows.NsecToTimespec(ctime.UnixNano())
c := windows.NsecToFiletime(windows.TimespecToNsec(ctimespec))
```

And looking at the Golang code, it looks like they're indeed the exact reverse:

```go
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }

func NsecToTimespec(nsec int64) (ts Timespec) {
    ts.Sec = nsec / 1e9
    ts.Nsec = nsec % 1e9
    return
}
```

While modifying this code, also renaming the `e` variable to a more common `err`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-07 19:38:56 +02:00
..
2022-07-23 08:36:20 -07:00
2018-12-14 23:18:42 +08:00
2021-08-05 22:27:46 -07:00
2021-08-22 09:31:50 +09:00
2021-08-05 22:27:46 -07:00
2018-02-19 10:32:26 +09:00