summaryrefslogtreecommitdiff
path: root/libexec/spamd
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2008-07-11 15:06:00 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2008-07-11 15:06:00 +0000
commit246306e2d8acee68a162beb162a3128cdc502c05 (patch)
treedd804fa7b6dcbedd720267f73268b69bf9389e4c /libexec/spamd
parent47e3ce3659d72e531b78d4f936831150075dbf84 (diff)
shut off an annoying gcc warning.
ok beck@
Diffstat (limited to 'libexec/spamd')
-rw-r--r--libexec/spamd/spamd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c
index 044caf7f017..2e0670a7e68 100644
--- a/libexec/spamd/spamd.c
+++ b/libexec/spamd/spamd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd.c,v 1.103 2007/11/03 19:16:07 beck Exp $ */
+/* $OpenBSD: spamd.c,v 1.104 2008/07/11 15:05:59 reyk Exp $ */
/*
* Copyright (c) 2002-2007 Bob Beck. All rights reserved.
@@ -610,6 +610,7 @@ gethelo(char *p, size_t len, char *f)
void
initcon(struct con *cp, int fd, struct sockaddr *sa)
{
+ socklen_t len = sa->sa_len;
time_t tt;
char *tmp;
int error;
@@ -626,7 +627,7 @@ initcon(struct con *cp, int fd, struct sockaddr *sa)
if (grow_obuf(cp, 0) == NULL)
err(1, "malloc");
cp->fd = fd;
- if (sa->sa_len > sizeof(cp->ss))
+ if (len > sizeof(cp->ss))
errx(1, "sockaddr size");
if (sa->sa_family != AF_INET)
errx(1, "not supported yet");