On Tue, 10.03.15 11:32, Didier Roche (didro...@ubuntu.com) wrote: > static int manager_send_plymouth_message(Manager *m, const char *message) { > - const char *plymouth_cancel_message = NULL; > + _cleanup_free_ const char *plymouth_cancel_message = NULL; > int r; > > r = manager_connect_plymouth(m); > @@ -258,7 +258,7 @@ static int manager_send_plymouth_message(Manager *m, > const char *message) { > > m->plymouth_cancel_sent = true; > > - plymouth_cancel_message = strjoina("fsckd-cancel-msg:", > _("Press Ctrl+C to cancel all filesystem checks in progress")); > + plymouth_cancel_message = strjoin("fsckd-cancel-msg:", > _("Press Ctrl+C to cancel all filesystem checks in progress"), NULL); >
Well, there's an OOM check missing now, as strjoin() can fail... That said, I think using strjoina is actually a good idea here, the string is not unbounded. Hence I think it would be a good idea to first assign the result of _() to a const char* variable in one step, and then concat it in a second... Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel