Richard W.M. Jones wrote:
From: Richard Jones <rjones@trick.home.annexia.org> ...
Looks fine.
+ snprintf (append, sizeof append, + LINUX_CMDLINE + "%s" /* (selinux) */ + "%s" /* (verbose) */ + "%s", /* (append) */ + g->selinux ? "selinux=1 enforcing=0 " : "selinux=0 ", + g->verbose ? "guestfs_verbose=1 " : " ", + g->append ? g->append : "");
You might prefer (more maintainable/readable) if the separating spaces were pulled "up" into the format string: snprintf (append, sizeof append, LINUX_CMDLINE "%s " /* (selinux) */ "%s " /* (verbose) */ "%s", /* (append) */ g->selinux ? "selinux=1 enforcing=0" : "selinux=0", g->verbose ? "guestfs_verbose=1" : "", g->append ? g->append : "");