summaryrefslogtreecommitdiff
path: root/extras/scsi_id/scsi_id.c
diff options
context:
space:
mode:
Diffstat (limited to 'extras/scsi_id/scsi_id.c')
-rw-r--r--extras/scsi_id/scsi_id.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c
index 6395b822ce..d2155e6866 100644
--- a/extras/scsi_id/scsi_id.c
+++ b/extras/scsi_id/scsi_id.c
@@ -713,7 +713,8 @@ static int scsi_id(const char *target_path, char *maj_min_dev)
#define ALIGN 512
unaligned_buf = malloc(MAX_SERIAL_LEN + ALIGN);
- serial = (char*) (((int) unaligned_buf + (ALIGN - 1)) & ~(ALIGN - 1));
+ serial = (char*) (((unsigned long) unaligned_buf + (ALIGN - 1))
+ & ~(ALIGN - 1));
dprintf("buffer unaligned 0x%p; aligned 0x%p\n", unaligned_buf, serial);
#undef ALIGN