[systemd-devel] [PATCH] machine: fix uninitialized variable
Tom Gundersen
teg at jklm.no
Sun Jul 6 05:13:49 PDT 2014
Thanks for the report. I pushed a slightly different fix. We generally
prefer to just return directly the value rather than assigning it to r
first (when possible).
-t
On Sun, Jul 6, 2014 at 1:33 PM, Ronny Chevalier
<chevalier.ronny at gmail.com> wrote:
> ---
> src/machine/machine.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/machine/machine.c b/src/machine/machine.c
> index c0fa1b2..7e90d61 100644
> --- a/src/machine/machine.c
> +++ b/src/machine/machine.c
> @@ -353,7 +353,7 @@ int machine_start(Machine *m, sd_bus_message *properties, sd_bus_error *error) {
> static int machine_stop_scope(Machine *m) {
> _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
> char *job = NULL;
> - int r;
> + int r = 0;
>
> assert(m);
>
> --
> 2.0.1
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
More information about the systemd-devel
mailing list