From 6faf377b5305f9dcc3c7b013c4d67f5accb92617 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Thu, 4 Jun 2009 23:21:12 -0700 Subject: types: clean up types, especially signed vs unsigned --- src/mem/bus.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mem/bus.cc') diff --git a/src/mem/bus.cc b/src/mem/bus.cc index b9cdff242..001c37a24 100644 --- a/src/mem/bus.cc +++ b/src/mem/bus.cc @@ -593,27 +593,27 @@ Bus::addressRanges(AddrRangeList &resp, bool &snoop, int id) } } -int +unsigned Bus::findBlockSize(int id) { if (cachedBlockSizeValid) return cachedBlockSize; - int max_bs = -1; + unsigned max_bs = 0; PortIter p_end = portMap.end(); for (PortIter p_iter = portMap.begin(); p_iter != p_end; p_iter++) { - int tmp_bs = interfaces[p_iter->second]->peerBlockSize(); + unsigned tmp_bs = interfaces[p_iter->second]->peerBlockSize(); if (tmp_bs > max_bs) max_bs = tmp_bs; } SnoopIter s_end = snoopPorts.end(); for (SnoopIter s_iter = snoopPorts.begin(); s_iter != s_end; s_iter++) { - int tmp_bs = (*s_iter)->peerBlockSize(); + unsigned tmp_bs = (*s_iter)->peerBlockSize(); if (tmp_bs > max_bs) max_bs = tmp_bs; } - if (max_bs <= 0) + if (max_bs == 0) max_bs = defaultBlockSize; if (max_bs != 64) -- cgit v1.2.3