diff mbox series

[2/2] formatting for error messages

Message ID 1e9caf1911d3b2663365f4487016499f47390333.1600395427.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series config: improve error message for boolean config | expand

Commit Message

Linus Arver via GitGitGadget Sept. 18, 2020, 2:17 a.m. UTC
From: Andrew Klotz <agc.klotz@gmail.com>

we no longer need to use `N_` instead of `_` here.

we had been using `N_` instead of `_` in the case this function
was being called by with `GIT_TEST_GETTEXT_POISON` leading to an
infinite loop.

Since we have moved `GIT_TEST_GETTEXT_POISON` out of
this function, (it is evaluated as a boolean, not an int)
we no longer need to handle the special case and can use `_`.

Signed-off-by: Andrew Klotz <agc.klotz@gmail.com>
---
 config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/config.c b/config.c
index 198d0d3216..624fb30fdd 100644
--- a/config.c
+++ b/config.c
@@ -990,8 +990,8 @@  NORETURN
 static void die_bad_number(const char *name, const char *value)
 {
 	const char *error_type = (errno == ERANGE) ?
-		N_("out of range") : N_("invalid unit");
-	const char *bad_numeric = N_("bad numeric config value '%s' for '%s': %s");
+		_("out of range") : _("invalid unit");
+	const char *bad_numeric = _("bad numeric config value '%s' for '%s': %s");
 
 	if (!value)
 		value = "";