diff options
author | Ian Gudger <igudger@google.com> | 2018-05-08 09:51:07 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-05-08 09:51:56 -0700 |
commit | b4765f782d91443ab0415dc00e727d783632e2ad (patch) | |
tree | 82c2b45b7d9fee5ceaf3792e34c5fdf09c69da43 /pkg/p9/local_server | |
parent | d0d01a18963ed7cfc29e5b8334e30b1234b6048b (diff) |
Fix warning: redundant if ...; err != nil check, just return error instead.
This warning is produced by golint.
PiperOrigin-RevId: 195833381
Change-Id: Idd6a7e57e3cfdf00819f2374b19fc113585dc1e1
Diffstat (limited to 'pkg/p9/local_server')
-rw-r--r-- | pkg/p9/local_server/local_server.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/pkg/p9/local_server/local_server.go b/pkg/p9/local_server/local_server.go index 5b1e97711..7a3e4cffe 100644 --- a/pkg/p9/local_server/local_server.go +++ b/pkg/p9/local_server/local_server.go @@ -246,11 +246,7 @@ func (l *local) Symlink(oldname string, newname string, _ p9.UID, _ p9.GID) (p9. // // Not properly implemented. func (l *local) Link(target p9.File, newname string) error { - if err := os.Link(target.(*local).path, path.Join(l.path, newname)); err != nil { - return err - } - - return nil + return os.Link(target.(*local).path, path.Join(l.path, newname)) } // Mknod implements p9.File.Mknod. |