diff options
author | Dan Cross <cross@gajendra.net> | 2020-01-10 14:44:21 +0000 |
---|---|---|
committer | Dan Cross <cross@gajendra.net> | 2020-01-10 14:54:30 +0000 |
commit | fa325e9b42b0bdfb48857d1958d9fb7ceac55151 (patch) | |
tree | 81d26256d152435135bcb1ae43121979a49f5f2b /src/lib9p | |
parent | 77a0a5b5194d4441c86de097f2aae297cb75e2c2 (diff) | |
download | plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.gz plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.bz2 plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.zip |
Trivial changes: whitespace and modes.
Remote whitespace at the ends of lines.
Remove blank lines from the ends of files.
Change modes on source files so that they
are not executable.
Signed-off-by: Dan Cross <cross@gajendra.net>
Diffstat (limited to 'src/lib9p')
-rw-r--r-- | src/lib9p/_post.c | 1 | ||||
-rw-r--r-- | src/lib9p/file.c | 4 | ||||
-rw-r--r-- | src/lib9p/intmap.c | 8 | ||||
-rw-r--r-- | src/lib9p/mem.c | 1 | ||||
-rw-r--r-- | src/lib9p/parse.c | 2 | ||||
-rw-r--r-- | src/lib9p/post.c | 1 | ||||
-rw-r--r-- | src/lib9p/req.c | 2 | ||||
-rw-r--r-- | src/lib9p/srv.c | 29 |
8 files changed, 22 insertions, 26 deletions
diff --git a/src/lib9p/_post.c b/src/lib9p/_post.c index 151e45ff..56f614fe 100644 --- a/src/lib9p/_post.c +++ b/src/lib9p/_post.c @@ -75,4 +75,3 @@ _post3(Postcrud *p) close(p->s->srvfd); free(p); } - diff --git a/src/lib9p/file.c b/src/lib9p/file.c index a18b0923..ea083993 100644 --- a/src/lib9p/file.c +++ b/src/lib9p/file.c @@ -86,7 +86,7 @@ removefile(File *f) { File *fp; Filelist *fl; - + fp = f->parent; if(fp == nil){ werrstr("no parent"); @@ -261,7 +261,7 @@ mkqid(vlong path, long vers, int type) return q; } - + Tree* alloctree(char *uid, char *gid, ulong mode, void (*destroy)(File*)) { diff --git a/src/lib9p/intmap.c b/src/lib9p/intmap.c index 1be11ce0..152493a3 100644 --- a/src/lib9p/intmap.c +++ b/src/lib9p/intmap.c @@ -62,7 +62,7 @@ freemap(Intmap *map, void (*destroy)(void*)) free(p); } } - + free(map); } @@ -74,7 +74,7 @@ llookup(Intmap *map, ulong id) for(lf=&map->hash[hashid(id)]; *lf; lf=&(*lf)->link) if((*lf)->id == id) break; - return lf; + return lf; } /* @@ -121,7 +121,7 @@ insertkey(Intmap *map, ulong id, void *v) ov = nil; } wunlock(&map->rwlock); - return ov; + return ov; } int @@ -144,7 +144,7 @@ caninsertkey(Intmap *map, ulong id, void *v) rv = 1; } wunlock(&map->rwlock); - return rv; + return rv; } void* diff --git a/src/lib9p/mem.c b/src/lib9p/mem.c index 397bca0f..88d24cd4 100644 --- a/src/lib9p/mem.c +++ b/src/lib9p/mem.c @@ -39,4 +39,3 @@ estrdup9p(char *s) setmalloctag(t, getcallerpc(&s)); return t; } - diff --git a/src/lib9p/parse.c b/src/lib9p/parse.c index 753ae79d..b8dff3d3 100644 --- a/src/lib9p/parse.c +++ b/src/lib9p/parse.c @@ -70,7 +70,7 @@ respondcmderror(Req *r, Cmdbuf *cb, char *fmt, ...) va_list arg; char *p, *e; char err[ERRMAX]; - + e = err+ERRMAX-10; va_start(arg, fmt); p = vseprint(err, e, fmt, arg); diff --git a/src/lib9p/post.c b/src/lib9p/post.c index 09296a88..4ee99bc8 100644 --- a/src/lib9p/post.c +++ b/src/lib9p/post.c @@ -21,4 +21,3 @@ postmountsrv(Srv *s, char *name, char *mtpt, int flag) _post3(p); } } - diff --git a/src/lib9p/req.c b/src/lib9p/req.c index 83347050..9acbcdc5 100644 --- a/src/lib9p/req.c +++ b/src/lib9p/req.c @@ -33,7 +33,7 @@ freereqpool(Reqpool *p) { freemap(p->map, (void(*)(void*))p->destroy); free(p); -} +} Req* allocreq(Reqpool *pool, ulong tag) diff --git a/src/lib9p/srv.c b/src/lib9p/srv.c index d12e3522..c3d65479 100644 --- a/src/lib9p/srv.c +++ b/src/lib9p/srv.c @@ -98,7 +98,7 @@ if(chatty9p) if(chatty9p) if(r->error) fprint(2, "<-%d- %F: %s\n", s->infd, &r->ifcall, r->error); - else + else fprint(2, "<-%d- %F\n", s->infd, &r->ifcall); return r; @@ -378,7 +378,7 @@ sopen(Srv *srv, Req *r) default: assert(0); case OREAD: - p = AREAD; + p = AREAD; break; case OWRITE: p = AWRITE; @@ -387,7 +387,7 @@ sopen(Srv *srv, Req *r) p = AREAD|AWRITE; break; case OEXEC: - p = AEXEC; + p = AEXEC; break; } if(r->ifcall.mode&OTRUNC) @@ -588,7 +588,7 @@ rremove(Req *r, char *error, char *errbuf) return; if(r->fid->file){ if(removefile(r->fid->file) < 0){ - snprint(errbuf, ERRMAX, "remove %s: %r", + snprint(errbuf, ERRMAX, "remove %s: %r", r->fid->file->dir.name); r->error = errbuf; } @@ -614,8 +614,8 @@ sstat(Srv *srv, Req *r) if(r->d.muid) r->d.muid = estrdup9p(r->d.muid); } - if(srv->stat) - srv->stat(r); + if(srv->stat) + srv->stat(r); else if(r->fid->file) respond(r, nil); else @@ -720,7 +720,7 @@ srv(Srv *srv) while(r = getreq(srv)){ if(r->error){ respond(r, r->error); - continue; + continue; } switch(r->ifcall.type){ default: @@ -760,7 +760,7 @@ respond(Req *r, char *error) assert(r->pool); goto free; } - + assert(r->responded == 0); r->error = error; @@ -812,8 +812,8 @@ if(chatty9p) * There is a race here - we must remove the entry before * the write, so that if the client is very fast and reuses the * tag, the read loop won't think it is still in use. - * - * By removing the entry before the write, we open up a + * + * By removing the entry before the write, we open up a * race with incoming Tflush messages. Specifically, an * incoming Tflush might not see r even though it has not * yet been responded to. It would then send an Rflush @@ -833,12 +833,12 @@ if(chatty9p) * There are no references other than in our r->flush array, * so no one else should be accessing r concurrently. * Close the fid now, before responding to the message. - * + * * If the client is behaving (there are no outstanding T-messages * that reference r->fid) and the message is a Tclunk or Tremove, - * then this closefid will call destroyfid. - * - * This means destroyfid can't piddle around + * then this closefid will call destroyfid. + * + * This means destroyfid can't piddle around * indefinitely (we're holding srv->wlock!), but it provides * for tighter semantics as to when destroyfid is called. * @@ -899,4 +899,3 @@ postfd(char *name, int pfd) fprint(2, "postfd successful\n"); return 0; } - |