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.
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) {