aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-02-06 08:44:34 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2008-02-06 08:44:34 +0000
commita899d134fb11a7cd835d9a2266d31451287c7d14 (patch)
tree245a78db834bc46c156ce99e07fbb89b4a8a77d6
parent77757c8d84e0fdde04be923c8a7f3ea8cd7bcf39 (diff)
downloadmailfromd-a899d134fb11a7cd835d9a2266d31451287c7d14.tar.gz
mailfromd-a899d134fb11a7cd835d9a2266d31451287c7d14.tar.bz2
* src/dnsbase.c (dns_resolve_hostname,a_lookup): Change
initialization of domainbuf. * src/syslog_async.c: Include fcntl.h. git-svn-id: file:///svnroot/mailfromd/trunk@1604 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r--ChangeLog6
-rw-r--r--src/dnsbase.c8
-rw-r--r--src/syslog_async.c1
3 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0335e494..adb08638 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,18 @@
+2008-02-06 Sergey Poznyakoff <gray@gnu.org.ua>
+
+ * src/dnsbase.c (dns_resolve_hostname,a_lookup): Change
+ initialization of domainbuf.
+ * src/syslog_async.c: Include fcntl.h.
+
2008-02-04 Sergey Poznyakoff <gray@gnu.org.ua>
* configure.ac: Check for locale.h
* src/db.c, src/bi_sprintf.m4, src/prog.c, src/bi_db.m4,
src/engine.c: Fix format arguments (ported from
branches/gmach@{2008-01-28 and 2008-01-09).
* src/main.c, src/mtasim.c: Include locale.h
2008-01-21 Sergey Poznyakoff <gray@gnu.org.ua>
* src/symtab.c: Ported r1584 from branches/gmach.
* NEWS: Update.
diff --git a/src/dnsbase.c b/src/dnsbase.c
index 3d063166..ba5de172 100644
--- a/src/dnsbase.c
+++ b/src/dnsbase.c
@@ -567,26 +567,27 @@ dns_resolve_ipstr(const char *ipstr, const char *domain,
}
*ttl = ld.ttl;
return ld.status;
}
dns_status
dns_resolve_hostname(const char *host, char *answer, size_t answer_size,
char *ipbuf, size_t ipbsize, unsigned long *ttl)
{
struct loop_data ld;
char namebuf[NSIZE];
- char domainbuf[NSIZE] = "";
-
+ char domainbuf[NSIZE];
+
+ domainbuf[0] = 0;
ld.qtype = ld.atype = T_A;
strncpy(namebuf, host, sizeof namebuf - 1);
ld.name = namebuf;
ld.name_size = sizeof namebuf;
ld.domain = domainbuf;
ld.domain_size = sizeof domainbuf;
ld.answer = answer;
ld.answer_size = answer_size;
ld.hbuf = ipbuf;
ld.hbsize = ipbsize;
ld.hbcount = 0;
@@ -607,26 +608,27 @@ dns_resolve_hostname(const char *host, char *answer, size_t answer_size,
*ttl = ld.ttl;
return ld.status;
}
dns_status
a_lookup(const char *host,
GACOPYZ_UINT32_T *ipbuf, size_t ipbsize, size_t *ipcount,
unsigned long *ttl, char *answer, size_t answer_size)
{
struct loop_data ld;
char namebuf[NSIZE];
- char domainbuf[NSIZE] = "";
+ char domainbuf[NSIZE];
+ domainbuf[0] = 0;
ld.qtype = ld.atype = T_A;
strncpy(namebuf, host, sizeof namebuf - 1);
ld.name = namebuf;
ld.name_size = sizeof namebuf;
ld.domain = domainbuf;
ld.domain_size = sizeof domainbuf;
ld.answer = answer;
ld.answer_size = answer_size;
ld.hbuf = (char*) ipbuf;
ld.hbsize = ipbsize * sizeof ipbuf[0];
ld.hbcount = 0;
ld.ttl = ~(unsigned long)0;
diff --git a/src/syslog_async.c b/src/syslog_async.c
index 006cf16e..0882f7be 100644
--- a/src/syslog_async.c
+++ b/src/syslog_async.c
@@ -15,24 +15,25 @@
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/file.h>
#include <sys/syslog.h>
#include <netinet/in.h>
#include <signal.h>
+#include <fcntl.h>
#include <sys/uio.h>
#include <sys/wait.h>
#include <netdb.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <errno.h>
#include <stdarg.h>
#include <stdlib.h>
#ifdef HAVE_PATHS_H
# include <paths.h>

Return to:

Send suggestions and report system problems to the System administrator.