summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrent Cook <bcook@cvs.openbsd.org>2019-01-20 02:50:04 +0000
committerBrent Cook <bcook@cvs.openbsd.org>2019-01-20 02:50:04 +0000
commit8ac55d1f80ad6e8ef01f5dd90e15439f17e3a8c9 (patch)
treec14ee6c1bb9523d328682c635e5905541cd3b576 /lib
parent9b92b576f86f322180f0daae8b36fe633a171e9f (diff)
Change imsg header definitions to use standard types.
ok deraadt@ claudio@
Diffstat (limited to 'lib')
-rw-r--r--lib/libutil/imsg-buffer.c4
-rw-r--r--lib/libutil/imsg.h10
-rw-r--r--lib/libutil/imsg_init.36
3 files changed, 11 insertions, 9 deletions
diff --git a/lib/libutil/imsg-buffer.c b/lib/libutil/imsg-buffer.c
index a4aee60bc05..7c60d9e9e72 100644
--- a/lib/libutil/imsg-buffer.c
+++ b/lib/libutil/imsg-buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imsg-buffer.c,v 1.11 2017/12/14 09:27:44 kettenis Exp $ */
+/* $OpenBSD: imsg-buffer.c,v 1.12 2019/01/20 02:50:03 bcook Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -70,7 +70,7 @@ ibuf_dynamic(size_t len, size_t max)
static int
ibuf_realloc(struct ibuf *buf, size_t len)
{
- u_char *b;
+ unsigned char *b;
/* on static buffers max is eq size and so the following fails */
if (buf->wpos + len > buf->max) {
diff --git a/lib/libutil/imsg.h b/lib/libutil/imsg.h
index 8bf9414789b..5b092cfcfd5 100644
--- a/lib/libutil/imsg.h
+++ b/lib/libutil/imsg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: imsg.h,v 1.4 2017/03/24 09:34:12 nicm Exp $ */
+/* $OpenBSD: imsg.h,v 1.5 2019/01/20 02:50:03 bcook Exp $ */
/*
* Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -21,13 +21,15 @@
#ifndef _IMSG_H_
#define _IMSG_H_
+#include <stdint.h>
+
#define IBUF_READ_SIZE 65535
#define IMSG_HEADER_SIZE sizeof(struct imsg_hdr)
#define MAX_IMSGSIZE 16384
struct ibuf {
TAILQ_ENTRY(ibuf) entry;
- u_char *buf;
+ unsigned char *buf;
size_t size;
size_t max;
size_t wpos;
@@ -42,8 +44,8 @@ struct msgbuf {
};
struct ibuf_read {
- u_char buf[IBUF_READ_SIZE];
- u_char *rptr;
+ unsigned char buf[IBUF_READ_SIZE];
+ unsigned char *rptr;
size_t wpos;
};
diff --git a/lib/libutil/imsg_init.3 b/lib/libutil/imsg_init.3
index 30c6334ff4b..18720d1d59b 100644
--- a/lib/libutil/imsg_init.3
+++ b/lib/libutil/imsg_init.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: imsg_init.3,v 1.22 2018/09/26 09:22:52 jmc Exp $
+.\" $OpenBSD: imsg_init.3,v 1.23 2019/01/20 02:50:03 bcook Exp $
.\"
.\" Copyright (c) 2010 Nicholas Marriott <nicm@openbsd.org>
.\"
@@ -14,7 +14,7 @@
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: September 26 2018 $
+.Dd $Mdocdate: January 20 2019 $
.Dt IMSG_INIT 3
.Os
.Sh NAME
@@ -320,7 +320,7 @@ a queue of output buffers for transmission:
.Bd -literal -offset indent
struct ibuf {
TAILQ_ENTRY(ibuf) entry;
- u_char *buf;
+ unsigned char *buf;
size_t size;
size_t max;
size_t wpos;