]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
ipcrm: use ternary operator in "(key|id) failed" message
authorFrancesco Cosoleto <cosoleto@gmail.com>
Wed, 28 Sep 2011 14:25:30 +0000 (16:25 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 28 Sep 2011 22:25:32 +0000 (00:25 +0200)
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
sys-utils/ipcrm.c

index dc47f90bb8889427db5f9a4eda36fba12d457aac..f6482abc1441d56eb573390c3e3e8e9ce009ba30 100644 (file)
@@ -107,9 +107,7 @@ static int remove_id(int type, int iskey, int id)
                        errmsg = iskey ? _("already removed key") : _("already removed id");
                        break;
                default:
-                       if (iskey)
-                               err(EXIT_FAILURE, _("key failed"));
-                       err(EXIT_FAILURE, _("id failed"));
+                       err(EXIT_FAILURE, iskey ? _("key failed") : _("id failed"));
                }
                warnx("%s (%d)", errmsg, id);
                return 1;