]> Cypherpunks repositories - gostls13.git/commitdiff
os: explicitly return nil for rootChown in root_openat.go
authorJes Cok <xigua67damn@gmail.com>
Fri, 14 Feb 2025 13:50:24 +0000 (13:50 +0000)
committerGopher Robot <gobot@golang.org>
Sat, 15 Feb 2025 04:21:32 +0000 (20:21 -0800)
It is consistent with the same function in root_noopenat.go.

Change-Id: I6ddbf4dfcc725cb2023bc6bed961cc525b9c43d2
GitHub-Last-Rev: 0802150a6a8e5d4bd395b702ecc518df1e8dd4c0
GitHub-Pull-Request: golang/go#71743
Reviewed-on: https://go-review.googlesource.com/c/go/+/649417
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>

src/os/root_openat.go

index 65d3eacf4df98bfcaaaeb5e571f95595858aa09b..cac0b1df0faf8b57588220ef9aaf5c5257ba671b 100644 (file)
@@ -84,7 +84,7 @@ func rootChown(r *Root, name string, uid, gid int) error {
        if err != nil {
                return &PathError{Op: "chownat", Path: name, Err: err}
        }
-       return err
+       return nil
 }
 
 func rootMkdir(r *Root, name string, perm FileMode) error {