Declare nhd to be unsigned char, as we're only copying one byte to it.

From Matthias Drochner.
This commit is contained in:
fvdl 1999-03-11 12:34:36 +00:00
parent 570e759de9
commit bc38bb1052
1 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: bootinfo_biosgeom.c,v 1.4 1999/03/08 00:09:25 fvdl Exp $ */
/* $NetBSD: bootinfo_biosgeom.c,v 1.5 1999/03/11 12:34:36 fvdl Exp $ */
/*
* Copyright (c) 1997
@ -45,12 +45,13 @@
void bi_getbiosgeom()
{
struct btinfo_biosgeom *bibg;
int i, j, nhd, nvalid;
int i, j, nvalid;
unsigned char nhd;
unsigned int cksum;
pvbcopy((void *)(0x400 + 0x75), &nhd, 1);
#ifdef GEOM_DEBUG
printf("nhd %d\n", nhd);
printf("nhd %d\n", (int)nhd);
#endif
bibg = alloc(sizeof(struct btinfo_biosgeom)
@ -58,7 +59,7 @@ void bi_getbiosgeom()
if (!bibg)
return;
for (i = nvalid = 0; i < BI_NHD && nvalid < nhd; i++) {
for (i = nvalid = 0; i < BI_NHD && nvalid < (int)nhd; i++) {
struct biosdisk_ll d;
struct biosdisk_ext13info ed;
char buf[BIOSDISK_SECSIZE];