diff options
-rw-r--r-- | libusb/descriptor.c | 2 | ||||
-rw-r--r-- | libusb/libusbi.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libusb/descriptor.c b/libusb/descriptor.c index 6cbe23c..da4dbbe 100644 --- a/libusb/descriptor.c +++ b/libusb/descriptor.c @@ -51,7 +51,7 @@ int usbi_parse_descriptor(unsigned char *source, char *descriptor, void *dest, *dp++ = *sp++; break; case 'w': /* 16-bit word, convert from little endian to CPU */ - dp += ((unsigned long)dp & 1); /* Align to word boundary */ + dp += ((uintptr_t)dp & 1); /* Align to word boundary */ if (host_endian) { memcpy(dp, sp, 2); diff --git a/libusb/libusbi.h b/libusb/libusbi.h index 6d2e661..2355535 100644 --- a/libusb/libusbi.h +++ b/libusb/libusbi.h @@ -54,7 +54,7 @@ struct list_head { * member - the list_head element in "type" */ #define list_entry(ptr, type, member) \ - ((type *)((char *)(ptr) - (unsigned long)(&((type *)0L)->member))) + ((type *)((uintptr_t)(ptr) - (uintptr_t)(&((type *)0L)->member))) /* Get each entry from a list * pos - A structure pointer has a "member" element |