aboutsummaryrefslogtreecommitdiff
path: root/src/archive
diff options
context:
space:
mode:
authorJes Cok <xigua67damn@gmail.com>2023-09-15 21:15:56 +0000
committerGopher Robot <gobot@golang.org>2023-09-18 20:01:34 +0000
commitf4e7675d1150cb683f3d2db7a96084b0d6e26e83 (patch)
tree340df6f82a5795fd470b3a0dc97b807178f99225 /src/archive
parent3702cb5ab95575830488dc2b1ca9424651f828cf (diff)
downloadgo-f4e7675d1150cb683f3d2db7a96084b0d6e26e83.tar.gz
go-f4e7675d1150cb683f3d2db7a96084b0d6e26e83.zip
all: clean unnecessary casts
Run 'unconvert -safe -apply' (https://github.com/mdempsky/unconvert) Change-Id: I24b7cd7d286cddce86431d8470d15c5f3f0d1106 GitHub-Last-Rev: 022e75384c08bb899a8951ba0daffa0f2e14d5a7 GitHub-Pull-Request: golang/go#62662 Reviewed-on: https://go-review.googlesource.com/c/go/+/528696 Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/archive')
-rw-r--r--src/archive/zip/reader.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/archive/zip/reader.go b/src/archive/zip/reader.go
index 1fde1decc4..71bf8c2adb 100644
--- a/src/archive/zip/reader.go
+++ b/src/archive/zip/reader.go
@@ -469,8 +469,8 @@ parseExtras:
const ticksPerSecond = 1e7 // Windows timestamp resolution
ts := int64(attrBuf.uint64()) // ModTime since Windows epoch
- secs := int64(ts / ticksPerSecond)
- nsecs := (1e9 / ticksPerSecond) * int64(ts%ticksPerSecond)
+ secs := ts / ticksPerSecond
+ nsecs := (1e9 / ticksPerSecond) * (ts % ticksPerSecond)
epoch := time.Date(1601, time.January, 1, 0, 0, 0, 0, time.UTC)
modified = time.Unix(epoch.Unix()+secs, nsecs)
}