From fbacb350391667fa9ffb78a84ae51a37d477aa02 Mon Sep 17 00:00:00 2001 From: Nicolas Lacasse Date: Wed, 6 Mar 2019 15:05:43 -0800 Subject: No need to check for negative uintptr. Fixes #134 PiperOrigin-RevId: 237128306 Change-Id: I396e808484c18931fc5775970ec1f5ae231e1cb9 --- pkg/sentry/fs/host/util_unsafe.go | 3 --- 1 file changed, 3 deletions(-) (limited to 'pkg/sentry/fs/host/util_unsafe.go') diff --git a/pkg/sentry/fs/host/util_unsafe.go b/pkg/sentry/fs/host/util_unsafe.go index d00da89d6..a8721d197 100644 --- a/pkg/sentry/fs/host/util_unsafe.go +++ b/pkg/sentry/fs/host/util_unsafe.go @@ -57,9 +57,6 @@ func readLink(fd int) (string, error) { uintptr(unsafe.Pointer(&b[0])), uintptr(l), 0, 0) - if n < 0 { - n = 0 - } if errno != 0 { return "", errno } -- cgit v1.2.3