diff options
author | Nathan Binkert <nate@binkert.org> | 2009-06-04 23:21:12 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2009-06-04 23:21:12 -0700 |
commit | 6faf377b5305f9dcc3c7b013c4d67f5accb92617 (patch) | |
tree | 0e437fb49a32dd3d2d2bec95a8dc3bdb4ddf05b0 /src/mem/bus.cc | |
parent | 4e3426624557b555c354035ee3961eab7554d81d (diff) | |
download | gem5-6faf377b5305f9dcc3c7b013c4d67f5accb92617.tar.xz |
types: clean up types, especially signed vs unsigned
Diffstat (limited to 'src/mem/bus.cc')
-rw-r--r-- | src/mem/bus.cc | 10 |
1 files changed, 5 insertions, 5 deletions
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) |