diff options
author | John Denker <jsd@av8n.com> | 2012-07-29 15:45:38 -0700 |
---|---|---|
committer | John Denker <jsd@av8n.com> | 2012-07-29 15:45:38 -0700 |
commit | 0d2205555e68f414eec0afa8a6531626f77c4a57 (patch) | |
tree | f0e7d3e161f82180e834a6368d41b79272ab013a /ucspi-tcp-0.88/dns_dfd.c | |
parent | 0c7195dea3482bd4c9ac9fbff318c24c502574c6 (diff) | |
parent | 01ef1d365e5776b130e8b65772a80b6adcb0ed46 (diff) |
Merge branch 'master' of ephedra:usr/src/qmail into e_master
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; } |