qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] vnc: Drop superfluous conditionals around g


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 2/2] vnc: Drop superfluous conditionals around g_strdup()
Date: Fri, 06 Jun 2014 18:50:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Paolo Bonzini <address@hidden> writes:

> Il 06/06/2014 18:36, Markus Armbruster ha scritto:
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>>  ui/vnc.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/ui/vnc.c b/ui/vnc.c
>> index d771a2c..0853ded 100644
>> --- a/ui/vnc.c
>> +++ b/ui/vnc.c
>> @@ -3010,9 +3010,7 @@ int vnc_display_password(DisplayState *ds, const char 
>> *password)
>>
>>      g_free(vs->password);
>>      vs->password = NULL;
>> -    if (password) {
>> -        vs->password = g_strdup(password);
>> -    }
>> +    vs->password = g_strdup(password);
>
> You have a dead store now. :)

Noticed right after I sent %-}

Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]