summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2008-02-06 08:44:34 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2008-02-06 08:44:34 (GMT)
commita899d134fb11a7cd835d9a2266d31451287c7d14 (patch) (side-by-side diff)
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
Diffstat (more/less context) (ignore whitespace changes)
-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 0335e49..adb0863 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
+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).
diff --git a/src/dnsbase.c b/src/dnsbase.c
index 3d06316..ba5de17 100644
--- a/src/dnsbase.c
+++ b/src/dnsbase.c
@@ -573,14 +573,15 @@ dns_resolve_ipstr(const char *ipstr, const char *domain,
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;
@@ -613,14 +614,15 @@ 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;
diff --git a/src/syslog_async.c b/src/syslog_async.c
index 006cf16..0882f7b 100644
--- a/src/syslog_async.c
+++ b/src/syslog_async.c
@@ -21,12 +21,13 @@
#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>

Return to:

Send suggestions and report system problems to the System administrator.