Module Name: src Committed By: martin Date: Wed Aug 17 12:27:50 UTC 2011
Modified Files: src/sbin/gpt: biosboot.c Log Message: Fix sign compare bugs To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sbin/gpt/biosboot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/gpt/biosboot.c diff -u src/sbin/gpt/biosboot.c:1.3 src/sbin/gpt/biosboot.c:1.4 --- src/sbin/gpt/biosboot.c:1.3 Wed Aug 17 00:45:55 2011 +++ src/sbin/gpt/biosboot.c Wed Aug 17 12:27:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: biosboot.c,v 1.3 2011/08/17 00:45:55 jakllsch Exp $ */ +/* $NetBSD: biosboot.c,v 1.4 2011/08/17 12:27:50 martin Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include <sys/cdefs.h> #ifdef __RCSID -__RCSID("$NetBSD: biosboot.c,v 1.3 2011/08/17 00:45:55 jakllsch Exp $"); +__RCSID("$NetBSD: biosboot.c,v 1.4 2011/08/17 12:27:50 martin Exp $"); #endif #include <sys/stat.h> @@ -212,7 +212,7 @@ hdr = gpt->map_data; - for (int j = 0; j < le32toh(hdr->hdr_entries); j++) { + for (uint32_t j = 0; j < le32toh(hdr->hdr_entries); j++) { ent = (void*)((char*)tbl->map_data + j * le32toh(hdr->hdr_entsz)); ent->ent_attr &= ~GPT_ENT_ATTR_LEGACY_BIOS_BOOTABLE; } @@ -231,7 +231,7 @@ hdr = tpg->map_data; - for (int j = 0; j < le32toh(hdr->hdr_entries); j++) { + for (uint32_t j = 0; j < le32toh(hdr->hdr_entries); j++) { ent = (void*)((char*)lbt->map_data + j * le32toh(hdr->hdr_entsz)); ent->ent_attr &= ~GPT_ENT_ATTR_LEGACY_BIOS_BOOTABLE; }