diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2012-08-08 17:33:56 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2012-08-08 17:33:56 +0000 |
commit | e9e21710716aeb3946cfd138c7905139e9809c47 (patch) | |
tree | 0ada24b2c0719504f4a4f849324f2ced792530d2 /usr.sbin | |
parent | 33eccc9247b81f370b77d4f1c29c2f32f89889d8 (diff) |
remove useless defines
ok gilles@ chl@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/control.c | 4 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpctl.c | 4 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 9 |
3 files changed, 5 insertions, 12 deletions
diff --git a/usr.sbin/smtpd/control.c b/usr.sbin/smtpd/control.c index 875bf2a081e..2808e7bfd2f 100644 --- a/usr.sbin/smtpd/control.c +++ b/usr.sbin/smtpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.65 2012/07/09 09:57:53 gilles Exp $ */ +/* $OpenBSD: control.c,v 1.66 2012/08/08 17:33:55 eric Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -374,7 +374,7 @@ control_dispatch_ext(int fd, short event, void *arg) if (euid) goto badcred; - if (IMSG_DATA_SIZE(&imsg) != sizeof(verbose)) + if (imsg.hdr.len - IMSG_HEADER_SIZE != sizeof(verbose)) goto badcred; memcpy(&verbose, imsg.data, sizeof(verbose)); diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c index aefbcbb8b4c..af948be20fa 100644 --- a/usr.sbin/smtpd/smtpctl.c +++ b/usr.sbin/smtpd/smtpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpctl.c,v 1.84 2012/08/07 20:36:10 eric Exp $ */ +/* $OpenBSD: smtpctl.c,v 1.85 2012/08/08 17:33:55 eric Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -351,7 +351,7 @@ show_stats_output(struct imsg *imsg) if (imsg->hdr.type != IMSG_STATS) errx(1, "show_stats_output: bad hdr type (%d)", imsg->hdr.type); - if (IMSG_DATA_SIZE(imsg) != sizeof(*stats)) + if (imsg->hdr.len - IMSG_HEADER_SIZE != sizeof(*stats)) errx(1, "show_stats_output: bad data size"); stats = imsg->data; diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index 7941fd73bba..62f6ae20cfe 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.315 2012/08/08 08:50:42 eric Exp $ */ +/* $OpenBSD: smtpd.h,v 1.316 2012/08/08 17:33:55 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -26,13 +26,6 @@ #include "ioev.h" #include "iobuf.h" -#define IMSG_SIZE_CHECK(p) do { \ - if (IMSG_DATA_SIZE(&imsg) != sizeof(*p)) \ - fatalx("bad length imsg received"); \ - } while (0) -#define IMSG_DATA_SIZE(imsg) ((imsg)->hdr.len - IMSG_HEADER_SIZE) - - #define CONF_FILE "/etc/mail/smtpd.conf" #define MAX_LISTEN 16 #define PROC_COUNT 9 |