summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/buffer.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-12-20 14:33:10 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-12-20 14:33:10 +0000
commit8d2091aad42c6f6730b9d49e2043c0c6981938b9 (patch)
tree94d25a38506c7d5fec4938ca3eb5bbe8a405cb67 /usr.sbin/bgpd/buffer.c
parentb5ba359031b31d68f469401aa4459f3b6004c80b (diff)
read(2)/write(2) return ssize_t, not size_t
Diffstat (limited to 'usr.sbin/bgpd/buffer.c')
-rw-r--r--usr.sbin/bgpd/buffer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/bgpd/buffer.c b/usr.sbin/bgpd/buffer.c
index 8fc324646d8..f93c2660ed6 100644
--- a/usr.sbin/bgpd/buffer.c
+++ b/usr.sbin/bgpd/buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buffer.c,v 1.1 2003/12/17 11:46:54 henning Exp $ */
+/* $OpenBSD: buffer.c,v 1.2 2003/12/20 14:33:09 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -33,7 +33,7 @@ void buf_enqueue(struct buf *);
void buf_dequeue(struct buf *);
struct buf *
-buf_open(struct peer *peer, int sock, size_t len)
+buf_open(struct peer *peer, int sock, ssize_t len)
{
struct buf *buf;
@@ -52,7 +52,7 @@ buf_open(struct peer *peer, int sock, size_t len)
}
int
-buf_add(struct buf *buf, u_char *data, size_t len)
+buf_add(struct buf *buf, u_char *data, ssize_t len)
{
if (buf->wpos + len > buf->size)
return (-1);
@@ -63,7 +63,7 @@ buf_add(struct buf *buf, u_char *data, size_t len)
}
u_char *
-buf_reserve(struct buf *buf, size_t len)
+buf_reserve(struct buf *buf, ssize_t len)
{
u_char *b;
@@ -101,7 +101,7 @@ buf_close(struct buf *buf)
int
buf_write(struct buf *buf)
{
- size_t n;
+ ssize_t n;
if ((n = write(buf->sock, buf->buf + buf->rpos,
buf->size-buf->rpos)) == -1) {