summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-11-22 00:24:23 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-11-22 00:24:23 +0000
commitfe5f7695fb075c5f8f7f4b550a92ed10bfbab413 (patch)
tree956a723399dc4bc76712fdae718ed2b2329f3617 /usr.sbin
parent2a9850026ed517e2f6e0475eac5318a7108139e1 (diff)
use size_t where appropriate. ok deraadt reyk
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/httpd/config.c4
-rw-r--r--usr.sbin/httpd/httpd.c6
-rw-r--r--usr.sbin/relayd/config.c4
-rw-r--r--usr.sbin/relayd/relayd.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/usr.sbin/httpd/config.c b/usr.sbin/httpd/config.c
index e5455718247..bf5269ba9b5 100644
--- a/usr.sbin/httpd/config.c
+++ b/usr.sbin/httpd/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.22 2014/09/05 10:04:20 reyk Exp $ */
+/* $OpenBSD: config.c,v 1.23 2014/11/22 00:24:22 tedu Exp $ */
/*
* Copyright (c) 2011 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -346,7 +346,7 @@ config_getserver(struct httpd *env, struct imsg *imsg)
/* Reset these variables to avoid free'ing invalid pointers */
serverconfig_reset(&srv_conf);
- if ((u_int)(IMSG_DATA_SIZE(imsg) - s) <
+ if ((off_t)(IMSG_DATA_SIZE(imsg) - s) <
(srv_conf.ssl_cert_len + srv_conf.ssl_key_len)) {
log_debug("%s: invalid message length", __func__);
goto fail;
diff --git a/usr.sbin/httpd/httpd.c b/usr.sbin/httpd/httpd.c
index 0b8d8b75418..23fd0240c53 100644
--- a/usr.sbin/httpd/httpd.c
+++ b/usr.sbin/httpd/httpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: httpd.c,v 1.25 2014/11/21 17:49:10 deraadt Exp $ */
+/* $OpenBSD: httpd.c,v 1.26 2014/11/22 00:24:22 tedu Exp $ */
/*
* Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
@@ -493,7 +493,7 @@ canonicalize_host(const char *host, char *name, size_t len)
{
struct sockaddr_in sin4;
struct sockaddr_in6 sin6;
- u_int i, j;
+ size_t i, j;
size_t plen;
char c;
@@ -692,7 +692,7 @@ evbuffer_getline(struct evbuffer *evb)
u_int8_t *ptr = EVBUFFER_DATA(evb);
size_t len = EVBUFFER_LENGTH(evb);
char *str;
- u_int i;
+ size_t i;
/* Safe version of evbuffer_readline() */
if ((str = get_string(ptr, len)) == NULL)
diff --git a/usr.sbin/relayd/config.c b/usr.sbin/relayd/config.c
index 0cdec86bab6..97447b7abbe 100644
--- a/usr.sbin/relayd/config.c
+++ b/usr.sbin/relayd/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.19 2014/11/19 10:24:40 blambert Exp $ */
+/* $OpenBSD: config.c,v 1.20 2014/11/22 00:24:22 tedu Exp $ */
/*
* Copyright (c) 2011 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -912,7 +912,7 @@ config_getrelay(struct relayd *env, struct imsg *imsg)
}
}
- if ((u_int)(IMSG_DATA_SIZE(imsg) - s) <
+ if ((off_t)(IMSG_DATA_SIZE(imsg) - s) <
(rlay->rl_conf.ssl_cert_len +
rlay->rl_conf.ssl_key_len +
rlay->rl_conf.ssl_ca_len +
diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c
index b0ffa7bcf5c..125d5c272da 100644
--- a/usr.sbin/relayd/relayd.c
+++ b/usr.sbin/relayd/relayd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relayd.c,v 1.132 2014/11/19 10:24:40 blambert Exp $ */
+/* $OpenBSD: relayd.c,v 1.133 2014/11/22 00:24:22 tedu Exp $ */
/*
* Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -1340,7 +1340,7 @@ canonicalize_host(const char *host, char *name, size_t len)
{
struct sockaddr_in sin4;
struct sockaddr_in6 sin6;
- u_int i, j;
+ size_t i, j;
size_t plen;
char c;