On Tue, Mar 07, 2017 at 03:23:08PM +0000, Frediano Ziglio wrote: > The nested if could be confusing, no needs for them. > > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> Acked-by: Victor Toso <victortoso@xxxxxxxxxx> > --- > server/reds.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/server/reds.c b/server/reds.c > index 41f24bb..2ad231e 100644 > --- a/server/reds.c > +++ b/server/reds.c > @@ -2012,12 +2012,13 @@ static void reds_handle_ticket(void *opaque) > goto error; > } > > - if (expired || strcmp(password, reds->config->taTicket.password) != 0) { > - if (expired) { > - spice_warning("Ticket has expired"); > - } else { > - spice_warning("Invalid password"); > - } > + if (expired) { > + spice_warning("Ticket has expired"); > + goto error; > + } > + > + if (strcmp(password, reds->config->taTicket.password) != 0) { > + spice_warning("Invalid password"); > goto error; > } > } > -- > 2.9.3 > > _______________________________________________ > Spice-devel mailing list > Spice-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/spice-devel
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel