devloopback: simplify loopoput()
remove unneeded waserror() block, loopoput is alled from loopbackbwrite only so we will always get called with a *single* block, so the concatblock() is not needed.
This commit is contained in:
parent
857f2528e0
commit
23d217afb4
1 changed files with 2 additions and 12 deletions
|
@ -549,23 +549,13 @@ loopbackwrite(Chan *c, void *va, long n, vlong off)
|
||||||
}
|
}
|
||||||
|
|
||||||
static long
|
static long
|
||||||
loopoput(Loop *lb, Link *link, Block *volatile bp)
|
loopoput(Loop *lb, Link *link, Block *bp)
|
||||||
{
|
{
|
||||||
long n;
|
long n = BLEN(bp);
|
||||||
|
|
||||||
n = BLEN(bp);
|
|
||||||
|
|
||||||
/* make it a single block with space for the loopback timing header */
|
|
||||||
if(waserror()){
|
|
||||||
freeb(bp);
|
|
||||||
nexterror();
|
|
||||||
}
|
|
||||||
bp = padblock(bp, Tmsize);
|
bp = padblock(bp, Tmsize);
|
||||||
if(bp->next)
|
|
||||||
bp = concatblock(bp);
|
|
||||||
if(BLEN(bp) < lb->minmtu)
|
if(BLEN(bp) < lb->minmtu)
|
||||||
bp = adjustblock(bp, lb->minmtu);
|
bp = adjustblock(bp, lb->minmtu);
|
||||||
poperror();
|
|
||||||
ptime(bp->rp, todget(nil));
|
ptime(bp->rp, todget(nil));
|
||||||
|
|
||||||
link->packets++;
|
link->packets++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue