]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
ipcrm: move a constant argument in order to gettextize the message
authorBenno Schulenberg <bensberg@telfort.nl>
Tue, 25 Mar 2025 10:42:55 +0000 (11:42 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 27 Mar 2025 09:50:46 +0000 (10:50 +0100)
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
sys-utils/ipcrm.c

index 11adf2f80dea1eedfbcde6ef9ceeb01fce56da70..ceb10118741df5a2bc7c1498a310f5a23aac14c9 100644 (file)
@@ -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;