From: Benno Schulenberg Date: Tue, 25 Mar 2025 10:42:55 +0000 (+0100) Subject: ipcrm: move a constant argument in order to gettextize the message X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=66d03a5ce78c7b539a733c72fc4198fd0d12c6b0;p=thirdparty%2Futil-linux.git ipcrm: move a constant argument in order to gettextize the message Signed-off-by: Benno Schulenberg --- diff --git a/sys-utils/ipcrm.c b/sys-utils/ipcrm.c index 11adf2f80..ceb101187 100644 --- a/sys-utils/ipcrm.c +++ b/sys-utils/ipcrm.c @@ -173,7 +173,7 @@ static int deprecated_main(int argc, char **argv) return 1; } -static unsigned long strtokey(const char *str, const char *errmesg) +static unsigned long strtokey(const char *str) { unsigned long num; char *end = NULL; @@ -190,9 +190,9 @@ static unsigned long strtokey(const char *str, const char *errmesg) return num; err: if (errno) - err(EXIT_FAILURE, "%s: '%s'", errmesg, str); + err(EXIT_FAILURE, _("failed to parse argument: '%s'"), str); else - errx(EXIT_FAILURE, "%s: '%s'", errmesg, str); + errx(EXIT_FAILURE, _("failed to parse argument: '%s'"), str); return 0; } @@ -200,7 +200,7 @@ static int key_to_id(type_id type, char *s) { int id; /* keys are in hex or decimal */ - key_t key = strtokey(s, "failed to parse argument"); + key_t key = strtokey(s); if (key == IPC_PRIVATE) { warnx(_("illegal key (%s)"), s); return -1;