Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx> On Tue, Nov 15, 2016 at 12:26:51AM +0100, Victor Toso wrote: > From: Victor Toso <me@xxxxxxxxxxxxxx> > > No need for if else here. > Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx> > --- > src/win-usb-dev.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/src/win-usb-dev.c b/src/win-usb-dev.c > index 1cf9f21..a857b02 100644 > --- a/src/win-usb-dev.c > +++ b/src/win-usb-dev.c > @@ -108,12 +108,11 @@ GQuark g_udev_client_error_quark(void) > > GUdevClient *g_udev_client_new(const gchar* const *subsystems) > { > - if (!singleton) { > - singleton = g_initable_new(G_UDEV_TYPE_CLIENT, NULL, NULL, NULL); > - return singleton; > - } else { > + if (singleton != NULL) > return g_object_ref(singleton); > - } > + > + singleton = g_initable_new(G_UDEV_TYPE_CLIENT, NULL, NULL, NULL); > + return singleton; > } > > > -- > 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