diff options
author | John Denker <jsd@av8n.com> | 2012-07-30 14:34:05 -0700 |
---|---|---|
committer | John Denker <jsd@av8n.com> | 2012-07-30 14:34:05 -0700 |
commit | 7024dc330299921af649330c45b99c21c3d7f022 (patch) | |
tree | 9f747a0423647b016376fe353ceea197a5848cbf /ucspi-tcp-0.88/dns_dfd.c | |
parent | ce0dbe5332d4eb921c09cc48cc52634211d7089a (diff) | |
parent | f8be4baf5a2318363b42f8883f66ed8a976dfc79 (diff) |
Merge branch 'master' of ephedra:usr/src/qmail into e_master
Conflicts:
tools/makefile
Diffstat (limited to 'ucspi-tcp-0.88/dns_dfd.c')
-rw-r--r-- | ucspi-tcp-0.88/dns_dfd.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ucspi-tcp-0.88/dns_dfd.c b/ucspi-tcp-0.88/dns_dfd.c index 14a29d8..c924718 100644 --- a/ucspi-tcp-0.88/dns_dfd.c +++ b/ucspi-tcp-0.88/dns_dfd.c @@ -1,9 +1,10 @@ -#include "error.h" -#include "alloc.h" +#include <stdlib.h> +#include <errno.h> #include "byte.h" #include "dns.h" +#include "error.h" -int dns_domain_fromdot(char **out,char *buf,unsigned int n) +int dns_domain_fromdot(char **out,const char *buf,unsigned int n) { char label[63]; unsigned int labellen = 0; /* <= sizeof label */ @@ -59,11 +60,11 @@ int dns_domain_fromdot(char **out,char *buf,unsigned int n) if (namelen + 1 > sizeof name) return 0; name[namelen++] = 0; - x = alloc(namelen); + x = malloc(namelen); if (!x) return 0; byte_copy(x,namelen,name); - if (*out) alloc_free(*out); + if (*out) free(*out); *out = x; return 1; } |