Fix printing bits above first eight.
Reported by: Coverity CID: 1372596 MFC after: 1 week
This commit is contained in:
parent
3869fb7832
commit
f988d55683
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315711
@ -5321,7 +5321,7 @@ static void
|
|||||||
cpi_print(struct ccb_pathinq *cpi)
|
cpi_print(struct ccb_pathinq *cpi)
|
||||||
{
|
{
|
||||||
char adapter_str[1024];
|
char adapter_str[1024];
|
||||||
int i;
|
uint64_t i;
|
||||||
|
|
||||||
snprintf(adapter_str, sizeof(adapter_str),
|
snprintf(adapter_str, sizeof(adapter_str),
|
||||||
"%s%d:", cpi->dev_name, cpi->unit_number);
|
"%s%d:", cpi->dev_name, cpi->unit_number);
|
||||||
@ -5329,7 +5329,7 @@ cpi_print(struct ccb_pathinq *cpi)
|
|||||||
fprintf(stdout, "%s SIM/HBA version: %d\n", adapter_str,
|
fprintf(stdout, "%s SIM/HBA version: %d\n", adapter_str,
|
||||||
cpi->version_num);
|
cpi->version_num);
|
||||||
|
|
||||||
for (i = 1; i < 0xff; i = i << 1) {
|
for (i = 1; i < UINT8_MAX; i = i << 1) {
|
||||||
const char *str;
|
const char *str;
|
||||||
|
|
||||||
if ((i & cpi->hba_inquiry) == 0)
|
if ((i & cpi->hba_inquiry) == 0)
|
||||||
@ -5369,7 +5369,7 @@ cpi_print(struct ccb_pathinq *cpi)
|
|||||||
fprintf(stdout, "%s\n", str);
|
fprintf(stdout, "%s\n", str);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 1; i < 0xff; i = i << 1) {
|
for (i = 1; i < UINT32_MAX; i = i << 1) {
|
||||||
const char *str;
|
const char *str;
|
||||||
|
|
||||||
if ((i & cpi->hba_misc) == 0)
|
if ((i & cpi->hba_misc) == 0)
|
||||||
@ -5416,7 +5416,7 @@ cpi_print(struct ccb_pathinq *cpi)
|
|||||||
fprintf(stdout, "%s\n", str);
|
fprintf(stdout, "%s\n", str);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 1; i < 0xff; i = i << 1) {
|
for (i = 1; i < UINT16_MAX; i = i << 1) {
|
||||||
const char *str;
|
const char *str;
|
||||||
|
|
||||||
if ((i & cpi->target_sprt) == 0)
|
if ((i & cpi->target_sprt) == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user