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>
This commit is contained in:
parent
77a0a5b519
commit
fa325e9b42
1021 changed files with 5688 additions and 6193 deletions
|
|
@ -75,4 +75,3 @@ _post3(Postcrud *p)
|
|||
close(p->s->srvfd);
|
||||
free(p);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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*))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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*
|
||||
|
|
|
|||
|
|
@ -39,4 +39,3 @@ estrdup9p(char *s)
|
|||
setmalloctag(t, getcallerpc(&s));
|
||||
return t;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -21,4 +21,3 @@ postmountsrv(Srv *s, char *name, char *mtpt, int flag)
|
|||
_post3(p);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ freereqpool(Reqpool *p)
|
|||
{
|
||||
freemap(p->map, (void(*)(void*))p->destroy);
|
||||
free(p);
|
||||
}
|
||||
}
|
||||
|
||||
Req*
|
||||
allocreq(Reqpool *pool, ulong tag)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue