summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2011-11-16 19:38:57 +0000
committerEric Faurot <eric@cvs.openbsd.org>2011-11-16 19:38:57 +0000
commit32728b9924e2231a7808b36549bf8b99504a0420 (patch)
tree64450525b4b1a5814515cbeb93abf8bae7c93045
parent6c3c9dcba9acc2fd81e89f1e452b994af298e87a (diff)
remove unused functions
ok gilles@ chl@
-rw-r--r--usr.sbin/smtpd/runner.c7
-rw-r--r--usr.sbin/smtpd/smtpd.h6
-rw-r--r--usr.sbin/smtpd/util.c66
3 files changed, 3 insertions, 76 deletions
diff --git a/usr.sbin/smtpd/runner.c b/usr.sbin/smtpd/runner.c
index 231241f60e9..2f5d45fa6a3 100644
--- a/usr.sbin/smtpd/runner.c
+++ b/usr.sbin/smtpd/runner.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: runner.c,v 1.125 2011/11/15 23:06:39 gilles Exp $ */
+/* $OpenBSD: runner.c,v 1.126 2011/11/16 19:38:56 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -59,11 +59,6 @@ static int runner_check_loop(struct envelope *);
static int runner_force_message_to_ramqueue(struct ramqueue *, u_int32_t);
-/*temporary*/
-u_int64_t filename_to_evpid(char *);
-u_int32_t filename_to_msgid(char *);
-
-
void
runner_imsg(struct imsgev *iev, struct imsg *imsg)
{
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h
index 05090f39e34..ff906d916fb 100644
--- a/usr.sbin/smtpd/smtpd.h
+++ b/usr.sbin/smtpd/smtpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.h,v 1.252 2011/11/16 11:18:55 eric Exp $ */
+/* $OpenBSD: smtpd.h,v 1.253 2011/11/16 19:38:56 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -1217,11 +1217,7 @@ void sa_set_port(struct sockaddr *, int);
u_int64_t generate_uid(void);
void fdlimit(double);
int availdesc(void);
-u_int32_t msgid_generate(void);
-u_int64_t evpid_generate(u_int32_t);
u_int32_t evpid_to_msgid(u_int64_t);
u_int64_t msgid_to_evpid(u_int32_t);
-u_int32_t filename_to_msgid(char *);
-u_int64_t filename_to_evpid(char *);
void log_imsg(int, int, struct imsg*);
int ckdir(const char *, mode_t, uid_t, gid_t, int);
diff --git a/usr.sbin/smtpd/util.c b/usr.sbin/smtpd/util.c
index e11307142dd..e1e0c95a87d 100644
--- a/usr.sbin/smtpd/util.c
+++ b/usr.sbin/smtpd/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.50 2011/11/14 11:53:10 eric Exp $ */
+/* $OpenBSD: util.c,v 1.51 2011/11/16 19:38:56 eric Exp $ */
/*
* Copyright (c) 2000,2001 Markus Friedl. All rights reserved.
@@ -581,70 +581,6 @@ log_sockaddr(struct sockaddr *sa)
}
u_int32_t
-filename_to_msgid(char *filename)
-{
- u_int32_t ulval;
- char *ep;
-
- errno = 0;
- ulval = strtoul(filename, &ep, 16);
- if (filename[0] == '\0' || *ep != '\0')
- return 0;
- if (errno == ERANGE && ulval == 0xffffffff)
- return 0;
-
- return ulval;
-}
-
-u_int64_t
-filename_to_evpid(char *filename)
-{
- u_int64_t ullval;
- char *ep;
-
- errno = 0;
- ullval = strtoull(filename, &ep, 16);
- if (filename[0] == '\0' || *ep != '\0')
- return 0;
- if (errno == ERANGE && ullval == ULLONG_MAX)
- return 0;
-
- return ullval;
-}
-
-u_int32_t
-msgid_generate(void)
-{
- u_int32_t ret;
-
- do {
- ret = arc4random();
- } while (ret == 0);
-
- log_debug("msgid_generate: %08x", ret);
-
- return ret;
-}
-
-u_int64_t
-evpid_generate(u_int32_t msgid)
-{
- u_int64_t ret;
-
- ret = msgid;
- log_debug("evpid_generate: %016" PRIx64, ret);
- ret <<= 32;
- log_debug("evpid_generate: %016" PRIx64, ret);
- do {
- ret |= arc4random();
- } while ((ret & 0xffffffff) == 0);
-
- log_debug("evpid_generate: %016" PRIx64, ret);
-
- return ret;
-}
-
-u_int32_t
evpid_to_msgid(u_int64_t evpid)
{
return (evpid >> 32);