aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2007-10-10 10:26:44 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2007-10-10 10:26:44 +0000
commitabba405eb603deaf69e31701464d8fdeb3aa1f2c (patch)
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
-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 425c82af..ebe66e63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,11 @@
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.
2007-09-13 Sergey Poznyakoff <gray@gnu.org.ua>
* src/prog.c (heap_obstack_grow): Bugfix. The condition didn't
diff --git a/src/cache.c b/src/cache.c
index 26a0c809..2bc63025 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -151,17 +151,18 @@ cache_expire_item(const void *content)
mf_status
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);
free(key);
}
return rc;
diff --git a/src/mailfromd.h b/src/mailfromd.h
index 7ce0f898..faf96d25 100644
--- a/src/mailfromd.h
+++ b/src/mailfromd.h
@@ -63,13 +63,13 @@
# define _(String) (String)
# define N_(String) String
# define gettext(msgid) (msgid)
# 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 */
typedef enum mf_status_code {
mf_success,
mf_not_found,

Return to:

Send suggestions and report system problems to the System administrator.