aboutsummaryrefslogtreecommitdiffstats
path: root/usb_device.h
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-02-28 12:07:08 +0100
committerAngel Pons <th3fanbus@gmail.com>2021-03-10 10:09:27 +0000
commit89261cc9223afded2ef4de2796d9b2edee24dbb1 (patch)
treec2cd46ebad4b51f4ac499fd0e73837c117b64806 /usb_device.h
parentb05c9b18452e3c73e80d0abd5194928d224c3d1b (diff)
downloadflashrom-89261cc9223afded2ef4de2796d9b2edee24dbb1.tar.gz
flashrom-89261cc9223afded2ef4de2796d9b2edee24dbb1.tar.bz2
flashrom-89261cc9223afded2ef4de2796d9b2edee24dbb1.zip
usb_device.h: Improve `LIBUSB_ERROR` macro
Guard macro parameters and correct a typo in the parameter name. TEST=Build with `make distclean && make VERSION=none -j` with and without this patch, the flashrom executable does not change. Change-Id: Ifc917b001713bc96adee46019d267f2090ef184a Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/51114 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'usb_device.h')
-rw-r--r--usb_device.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/usb_device.h b/usb_device.h
index b2c7656e..4abf751c 100644
--- a/usb_device.h
+++ b/usb_device.h
@@ -34,7 +34,7 @@
* flashrom recognizes. It does so without displaying an error code allowing us
* to compare error codes against the library enumeration values.
*/
-#define LIBUSB_ERROR(eror_code) (0x20000 | -eror_code)
+#define LIBUSB_ERROR(error_code) (0x20000 | -(error_code))
/*
* The LIBUSB macro converts a libusb failure code into an error code that