]> Cypherpunks repositories - gostls13.git/commitdiff
os: explicitly return nil for {rootChmod,rootMkdir,rootRemove} in root_openat.go
authorJes Cok <xigua67damn@gmail.com>
Thu, 13 Feb 2025 16:02:20 +0000 (16:02 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 13 Feb 2025 21:31:15 +0000 (13:31 -0800)
It is consistent with same functions in root_noopenat.go.

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

src/os/root_openat.go

index 5038c822f59a382e393990c0eda65ede34db2722..d98d2e36752f4bfa036950090d2166d64438d067 100644 (file)
@@ -74,7 +74,7 @@ func rootChmod(r *Root, name string, mode FileMode) error {
        if err != nil {
                return &PathError{Op: "chmodat", Path: name, Err: err}
        }
-       return err
+       return nil
 }
 
 func rootMkdir(r *Root, name string, perm FileMode) error {
@@ -84,7 +84,7 @@ func rootMkdir(r *Root, name string, perm FileMode) error {
        if err != nil {
                return &PathError{Op: "mkdirat", Path: name, Err: err}
        }
-       return err
+       return nil
 }
 
 func rootRemove(r *Root, name string) error {
@@ -94,7 +94,7 @@ func rootRemove(r *Root, name string) error {
        if err != nil {
                return &PathError{Op: "removeat", Path: name, Err: err}
        }
-       return err
+       return nil
 }
 
 // doInRoot performs an operation on a path in a Root.