Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/gpt Fix sign compare bugs



details:   https://anonhg.NetBSD.org/src/rev/e5501ede4de8
branches:  trunk
changeset: 768473:e5501ede4de8
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Aug 17 12:27:50 2011 +0000

description:
Fix sign compare bugs

diffstat:

 sbin/gpt/biosboot.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 9076a5427519 -r e5501ede4de8 sbin/gpt/biosboot.c
--- a/sbin/gpt/biosboot.c       Wed Aug 17 12:03:47 2011 +0000
+++ b/sbin/gpt/biosboot.c       Wed Aug 17 12:27:50 2011 +0000
@@ -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;
        }



Home | Main Index | Thread Index | Old Index