[pacman-dev] [PATCH 1/3] Pluralize malloc failure string

Allan McRae allan at archlinux.org
Mon Oct 19 04:28:23 UTC 2015


Not particularly useful in English (will always be plural), but useful in
languages that have multiple plural forms.

Signed-off-by: Allan McRae <allan at archlinux.org>
---
 src/pacman/conf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index 6a2b206..f02e361 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -95,7 +95,9 @@ config_t *config_new(void)
 	config_t *newconfig = calloc(1, sizeof(config_t));
 	if(!newconfig) {
 		pm_printf(ALPM_LOG_ERROR,
-				_("malloc failure: could not allocate %zd bytes\n"), sizeof(config_t));
+				_n("malloc failure: could not allocate %zd byte\n",
+				   "malloc failure: could not allocate %zd bytes\n", sizeof(config_t)),
+				sizeof(config_t));
 		return NULL;
 	}
 	/* defaults which may get overridden later */
-- 
2.6.1


More information about the pacman-dev mailing list