[systemd-devel] [PATCH] systemctl: fix variable initialization

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Tue Mar 12 07:38:26 PDT 2013


On Tue, Mar 12, 2013 at 03:34:26PM +0100, Michal Sekletar wrote:
> ---
>  src/systemctl/systemctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
> index 4a55c56..db12255 100644
> --- a/src/systemctl/systemctl.c
> +++ b/src/systemctl/systemctl.c
> @@ -1454,7 +1454,7 @@ static int start_unit_one(
>                  Set *s) {
>  
>          _cleanup_dbus_message_unref_ DBusMessage *reply = NULL;
> -        _cleanup_free_ char *n;
> +        _cleanup_free_ char *n = NULL;
>          const char *path;
>          int r;
Hi,

that's not necessary, it's initialized right below the assert
statements. They either do nothing or don't return, so it's fine
as is.

Zbyszek


More information about the systemd-devel mailing list