summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2007-10-10 10:26:44 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2007-10-10 10:26:44 (GMT)
commitabba405eb603deaf69e31701464d8fdeb3aa1f2c (patch) (side-by-side diff)
tree0c28b035774349a96eeffaad6be7fd95724679e7
parent589ccfd9dfd9e12438fa4bf8d98472709a00283e (diff)
downloadmailfromd-abba405eb603deaf69e31701464d8fdeb3aa1f2c.tar.gz
mailfromd-abba405eb603deaf69e31701464d8fdeb3aa1f2c.tar.bz2
* src/mailfromd.h [!ENABLE_NLS] (bindtextdomain): Fix definition.
* src/cache.c (cache_get2): Fix misplaced variable definition. git-svn-id: file:///svnroot/mailfromd/trunk@1514 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog3
-rw-r--r--src/cache.c5
-rw-r--r--src/mailfromd.h2
3 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 425c82a..ebe66e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2007-10-10 Sergey Poznyakoff <gray@gnu.org.ua>
+ * src/mailfromd.h [!ENABLE_NLS] (bindtextdomain): Fix definition.
+ * src/cache.c (cache_get2): Fix misplaced variable definition.
+
* src/dnsbase.c (dns_resolve_hostname): Remove stray free, left
over after 2007-09-03.
diff --git a/src/cache.c b/src/cache.c
index 26a0c80..2bc6302 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -154,11 +154,12 @@ cache_get2(char *email, char *client_addr)
{
mf_status rc = mf_failure;
size_t size;
-
+ char *key;
+
if (!cache_format->enabled)
return mf_failure;
size = strlen(email) + 1 + strlen(client_addr) + 1;
- char *key = malloc(size);
+ key = malloc(size);
if (key) {
strcat(strcat(strcpy(key, email), ":"), client_addr);
rc = cache_get(key);
diff --git a/src/mailfromd.h b/src/mailfromd.h
index 7ce0f89..faf96d2 100644
--- a/src/mailfromd.h
+++ b/src/mailfromd.h
@@ -66,7 +66,7 @@
# define dgettext(domain, msgid) (msgid)
# define ngettext(sg,pl,cnt) (cnt == 1) ? (sg) : (pl)
# define textdomain(Domain)
-# define bindtextdomain(Package, Directory)
+# define bindtextdomain(Package, Directory) (char*) ((errno = ENOSYS),NULL)
#endif /* ENABLE_NLS */
/* Status values used throughout the program */

Return to:

Send suggestions and report system problems to the System administrator.