diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-11-07 22:08:21 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-11-07 22:08:21 +0100 |
commit | 23d217afb45b6b74c151a91f12695c553721c4f1 (patch) | |
tree | f9386318053083e330d5b1b226f4c98624b6d95e /sys/src/9/port | |
parent | 857f2528e0b014b6bd839535daaa6b53853703d9 (diff) |
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.
Diffstat (limited to 'sys/src/9/port')
-rw-r--r-- | sys/src/9/port/devloopback.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/sys/src/9/port/devloopback.c b/sys/src/9/port/devloopback.c index cc51a1bf3..76f37890a 100644 --- a/sys/src/9/port/devloopback.c +++ b/sys/src/9/port/devloopback.c @@ -549,23 +549,13 @@ loopbackwrite(Chan *c, void *va, long n, vlong off) } 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); - if(bp->next) - bp = concatblock(bp); if(BLEN(bp) < lb->minmtu) bp = adjustblock(bp, lb->minmtu); - poperror(); ptime(bp->rp, todget(nil)); link->packets++; |