fedc1c1915
qemu_oom_check() is a function which essentially says "if you pass me a NULL pointer then print a message then abort()". On POSIX systems the message includes strerror(errno); on Windows it includes the GetLastError() error value printed as an integer. Other than in the implementation of qemu_memalign(), we use this function only in hw/usb/redirect.c, for three checks: * on a call to usbredirparser_create() * on a call to usberedirparser_serialize() * on a call to malloc() The usbredir library API functions make no guarantees that they will set errno on errors, let alone that they might set the Windows-specific GetLastError string. malloc() is documented as setting errno, not GetLastError -- and in any case the only thing it might set errno to is ENOMEM. So qemu_oom_check() isn't the right thing for any of these. Replace them with straightforward error-checking code. This will allow us to get rid of qemu_oom_check(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220226180723.1706285-2-peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> |
||
---|---|---|
.. | ||
bus.c | ||
ccid-card-emulated.c | ||
ccid-card-passthru.c | ||
ccid.h | ||
chipidea.c | ||
combined-packet.c | ||
core.c | ||
desc-msos.c | ||
desc.c | ||
desc.h | ||
dev-audio.c | ||
dev-hid.c | ||
dev-hub.c | ||
dev-mtp.c | ||
dev-network.c | ||
dev-serial.c | ||
dev-smartcard-reader.c | ||
dev-storage-bot.c | ||
dev-storage-classic.c | ||
dev-storage.c | ||
dev-uas.c | ||
dev-wacom.c | ||
hcd-dwc2.c | ||
hcd-dwc2.h | ||
hcd-dwc3.c | ||
hcd-ehci-pci.c | ||
hcd-ehci-sysbus.c | ||
hcd-ehci.c | ||
hcd-ehci.h | ||
hcd-musb.c | ||
hcd-ohci-pci.c | ||
hcd-ohci.c | ||
hcd-ohci.h | ||
hcd-uhci.c | ||
hcd-uhci.h | ||
hcd-xhci-nec.c | ||
hcd-xhci-pci.c | ||
hcd-xhci-pci.h | ||
hcd-xhci-sysbus.c | ||
hcd-xhci-sysbus.h | ||
hcd-xhci.c | ||
hcd-xhci.h | ||
host-libusb.c | ||
host.h | ||
imx-usb-phy.c | ||
Kconfig | ||
libhw.c | ||
meson.build | ||
pcap.c | ||
quirks-ftdi-ids.h | ||
quirks-pl2303-ids.h | ||
quirks.c | ||
quirks.h | ||
redirect.c | ||
trace-events | ||
trace.h | ||
tusb6010.c | ||
u2f-emulated.c | ||
u2f-passthru.c | ||
u2f.c | ||
u2f.h | ||
vt82c686-uhci-pci.c | ||
xen-usb.c | ||
xlnx-usb-subsystem.c | ||
xlnx-versal-usb2-ctrl-regs.c |