lib9p

Go 9P library.
Log | Files | Refs | LICENSE

commit 6655dc376f01de237a8c1f1915fb03098badaa13
parent 8378f098eb10b53d35319df5989161047fe390f4
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Thu,  4 Jan 2024 11:55:35 +0900

delete unnecessary ok variable

Diffstat:
Mserver.go | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/server.go b/server.go @@ -215,10 +215,10 @@ func sVersion(ctx context.Context, c *conn, rc <-chan *request) { } ifcall := r.ifcall.(*TVersion) version := ifcall.Version - if ok := strings.HasPrefix(version, "9P2000"); !ok { - version = "unknown" - } else { + if strings.HasPrefix(version, "9P2000") { version = "9P2000" + } else { + version = "unknown" } msize := ifcall.Msize if msize > c.mSize() { @@ -1118,7 +1118,7 @@ func sWStat(ctx context.Context, c *conn, rc <-chan *request) { } if wstat.Mtime != ^uint32(0) && wstat.Mtime != newStat.Mtime { // the owner of the file or the group leader of the file'c group. - if r.fid.uid != newStat.Uid && !isGroupLeader(c.s.fs, newStat.Gid, r.fid.uid) { + if r.fid.uid != newStat.Uid && !isGroupLeader(c.s.fs, newStat.Gid, r.fid.uid) { r.err = ErrPerm goto resp } @@ -1143,7 +1143,7 @@ func sWStat(ctx context.Context, c *conn, rc <-chan *request) { goto resp } r.ofcall = &RWStat{} - // TODO: update r.fid.path + // TODO: update r.fid.path resp: if r.err != nil { setError(r, r.err)