summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2005-03-12 00:02:08 +0000
committerBob Beck <beck@cvs.openbsd.org>2005-03-12 00:02:08 +0000
commitdd420d8d2cf46e968449cd9843fe226db67264f2 (patch)
treed6493b221d4a7f14a98a2d34a0537c60cf5f9520
parenteab8755c854d3ba03f4ae9a16301413b776741e0 (diff)
asprintf in place of strdup really is kind of lame
ok millert@
-rw-r--r--libexec/spamd/grey.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/spamd/grey.c b/libexec/spamd/grey.c
index 3cb1fcec39a..e3f85f48c8c 100644
--- a/libexec/spamd/grey.c
+++ b/libexec/spamd/grey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grey.c,v 1.20 2005/03/11 23:09:52 beck Exp $ */
+/* $OpenBSD: grey.c,v 1.21 2005/03/12 00:02:07 beck Exp $ */
/*
* Copyright (c) 2004,2005 Bob Beck. All rights reserved.
@@ -405,7 +405,7 @@ greyupdate(char *dbname, char *ip, char *from, char *to)
return(-1);
if (asprintf(&key, "%s\n%s\n%s", ip, from, to) == -1)
goto bad;
- if (asprintf(&trap, "%s",to) == -1)
+ if ((trap = strdup(to)) == NULL)
goto bad;
for (i = 0; trap[i] != '\0'; i++)
if (isupper(trap[i]))