Make some parameter constant. Make clear they don't change the passed value --- src/cd-scsi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cd-scsi.c b/src/cd-scsi.c index 9c5616b0..dbb78e54 100644 --- a/src/cd-scsi.c +++ b/src/cd-scsi.c @@ -432,12 +432,12 @@ void cd_scsi_target_free(CdScsiTarget *scsi_target) /* SCSI Device */ -static inline gboolean cd_scsi_target_lun_legal(CdScsiTarget *st, uint32_t lun) +static inline gboolean cd_scsi_target_lun_legal(const CdScsiTarget *st, uint32_t lun) { return (lun < st->max_luns) ? TRUE : FALSE; } -static inline gboolean cd_scsi_target_lun_realized(CdScsiTarget *st, uint32_t lun) +static inline gboolean cd_scsi_target_lun_realized(const CdScsiTarget *st, uint32_t lun) { return (st->num_luns == 0 || !st->units[lun].realized) ? FALSE : TRUE; } @@ -741,7 +741,7 @@ static void strpadcpy(char *buf, int buf_size, const char *str, char pad) /* SCSI CDB */ -static int scsi_cdb_length(uint8_t *cdb) +static int scsi_cdb_length(const uint8_t *cdb) { int cdb_len; @@ -765,7 +765,7 @@ static int scsi_cdb_length(uint8_t *cdb) return cdb_len; } -static uint64_t scsi_cdb_lba(uint8_t *cdb, int cdb_len) +static uint64_t scsi_cdb_lba(const uint8_t *cdb, int cdb_len) { uint64_t lba; @@ -798,7 +798,7 @@ static uint64_t scsi_cdb_lba(uint8_t *cdb, int cdb_len) return lba; } -static uint32_t scsi_cdb_xfer_length(uint8_t *cdb, int cdb_len) +static uint32_t scsi_cdb_xfer_length(const uint8_t *cdb, int cdb_len) { uint32_t len; -- 2.20.1 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel