For both patches, Acked-by: Victor Toso <victortoso@xxxxxxxxxx> On Thu, Aug 01, 2019 at 10:52:21AM +0100, Frediano Ziglio wrote: > "bus" field is 16 bit so returning using a guint8 type potentially > truncate the value. > > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> > --- > src/usb-device-manager-priv.h | 2 +- > src/usb-device-manager.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/usb-device-manager-priv.h b/src/usb-device-manager-priv.h > index 66acf6d5..2530d294 100644 > --- a/src/usb-device-manager-priv.h > +++ b/src/usb-device-manager-priv.h > @@ -29,7 +29,7 @@ G_BEGIN_DECLS > void spice_usb_device_manager_device_error( > SpiceUsbDeviceManager *manager, SpiceUsbDevice *device, GError *err); > > -guint8 spice_usb_device_get_busnum(const SpiceUsbDevice *device); > +guint16 spice_usb_device_get_busnum(const SpiceUsbDevice *device); > guint8 spice_usb_device_get_devaddr(const SpiceUsbDevice *device); > guint16 spice_usb_device_get_vid(const SpiceUsbDevice *device); > guint16 spice_usb_device_get_pid(const SpiceUsbDevice *device); > diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c > index 544e5687..a035683d 100644 > --- a/src/usb-device-manager.c > +++ b/src/usb-device-manager.c > @@ -1490,7 +1490,7 @@ static SpiceUsbDevice *spice_usb_device_new(SpiceUsbBackendDevice *bdev) > return info; > } > > -guint8 spice_usb_device_get_busnum(const SpiceUsbDevice *info) > +guint16 spice_usb_device_get_busnum(const SpiceUsbDevice *info) > { > const UsbDeviceInformation *b_info; > > -- > 2.20.1 > > _______________________________________________ > 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