From: Eugene Syromyatnikov Date: Thu, 29 Sep 2016 12:56:20 +0000 (+0300) Subject: keyctl: do not print comma for KEYCTL_SESSION_TO_PARENT command X-Git-Tag: v4.14~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7fa26e1712bd64358cd8e3ed590407d550fe2891;p=strace keyctl: do not print comma for KEYCTL_SESSION_TO_PARENT command Since this command doesn't have any additional arguments, the comma does not needed. Since this is the only command which lacks additional arguments, it's better to add special case for it rather than add printing of comma to all other commands. * keyctl.c (SYS_FUNC(keyctl)): Add check for command not being KEYCTL_SESSION_TO_PARENT when printing comma dividing cmd argument from the rest. --- diff --git a/keyctl.c b/keyctl.c index 5271d0ba..b2099df8 100644 --- a/keyctl.c +++ b/keyctl.c @@ -214,7 +214,13 @@ SYS_FUNC(keyctl) if (entering(tcp)) { printxval(keyctl_commands, cmd, "KEYCTL_???"); - tprints(", "); + + /* + * For now, KEYCTL_SESSION_TO_PARENT is the only cmd without + * arguments. + */ + if (cmd != KEYCTL_SESSION_TO_PARENT) + tprints(", "); } switch (cmd) {