tlibventi: return value nits - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 13096891711f32d8a7dca3e1ba9cced908752c14
(DIR) parent 5f1eaee2ab6c8d1b67ec6b1812c38e6e487569e4
(HTM) Author: Russ Cox <rsc@swtch.com>
Date: Sat, 14 Jun 2008 23:04:44 -0400
libventi: return value nits
Diffstat:
M src/libventi/packet.c | 2 +-
M src/libventi/send.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/src/libventi/packet.c b/src/libventi/packet.c
t@@ -888,7 +888,7 @@ memalloc(int n, int pos)
if(n < 0 || n > MaxFragSize) {
werrstr(EPacketSize);
- return 0;
+ return nil;
}
if(n <= SmallMemSize) {
lock(&freelist.lk);
(DIR) diff --git a/src/libventi/send.c b/src/libventi/send.c
t@@ -39,7 +39,7 @@ _vtsend(VtConn *z, Packet *p)
if(write(z->outfd, ioc.addr, ioc.len) < ioc.len){
vtlog(VtServerLog, "<font size=-1>%T %s:</font> sending packet %p: %r<br>\n", z->addr, p);
packetfree(p);
- return 0;
+ return -1;
}
packetconsume(p, nil, ioc.len);
tot += ioc.len;