M ip/il.c => ip/il.c +2 -4
@@ 587,7 587,7 @@ iliput(Proto *il, uchar*, Block *bp)
if(new == nil){
qunlock(il);
netlog(il->f, Logil, "il: bad newcall %I/%ud->%ud\n", raddr, sp, dp);
- ilsendctl(nil, ih, Ilclose, 0, nhgetl(ih->ilid), 0);
+ ilsendctl(s, ih, Ilclose, 0, nhgetl(ih->ilid), 0);
goto raise;
}
@@ 985,11 985,9 @@ ilsendctl(Conv *ipc, Ilhdr *inih, int type, ulong id, ulong ack, int ilspec)
if(ilcksum)
hnputs(ih->ilsum, ptclcsum(bp, IL_IPSIZE, IL_HDRSIZE));
- if(ipc){
- netlog(ipc->p->f, Logilmsg, "ctl(%s id %d ack %d %d->%d)\n",
+ netlog(ipc->p->f, Logilmsg, "ctl(%s id %d ack %d %d->%d)\n",
iltype[ih->iltype], nhgetl(ih->ilid), nhgetl(ih->ilack),
nhgets(ih->ilsrc), nhgets(ih->ildst));
- }
ipoput(ipc->p->f, bp, 0, ttl);
}
M port/chan.c => port/chan.c +1 -1
@@ 159,7 159,7 @@ addelem(Cname *n, char *s)
}
i = strlen(s);
- if(n->len+1+i+1 < n->alen){
+ if(n->len+1+i+1 > n->alen){
a = n->len+1+i+1 + CNAMESLOP;
t = smalloc(a);
memmove(t, n->s, n->len+1);
M port/dev.c => port/dev.c +0 -3
@@ 72,7 72,6 @@ devattach(int tc, char *spec)
c->qid = (Qid){CHDIR, 0};
c->type = devno(tc, 0);
sprint(buf, "#%C%s", tc, spec==nil? "" : spec);
- free(c->name);
c->name = newcname(buf);
return c;
}
@@ 100,8 99,6 @@ devclone(Chan *c, Chan *nc)
nc->mchan = c->mchan;
nc->mqid = c->mqid;
nc->mcp = c->mcp;
- if(c->name)
- incref(c->name);
return nc;
}
M port/devbridge.c => port/devbridge.c +0 -5
@@ 179,8 179,6 @@ bridgeattach(char* spec)
static int
bridgewalk(Chan *c, char *name)
{
- Path *op;
-
if(strcmp(name, "..") == 0){
switch(TYPE(c->qid)){
case Qtopdir:
@@ 193,9 191,6 @@ bridgewalk(Chan *c, char *name)
default:
panic("bridgewalk %lux", c->qid.path);
}
- op = c->path;
- c->path = ptenter(&syspt, op, name);
- decref(op);
return 1;
}
M port/log.c => port/log.c +1 -1
@@ 108,7 108,7 @@ logread(Log *alog, void *a, ulong, long n)
char*
logctl(Log *alog, int argc, char *argv[], Logflag *flags)
{
- int i, n, set;
+ int i, set;
Logflag *fp;
if(argc < 2)
M port/portfns.h => port/portfns.h +1 -1
@@ 117,7 117,7 @@ long hostdomainwrite(char*, int);
long hostownerwrite(char*, int);
void iallocinit(void);
Block* iallocb(int);
-void iallocsumary(void);
+void iallocsummary(void);
long ibrk(ulong, int);
void ilock(Lock*);
void iunlock(Lock*);