summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2016-02-06 17:21:19 -0800
committerSteve Reinhardt <steve.reinhardt@amd.com>2016-02-06 17:21:19 -0800
commit5592798865ece858bab2b444bc782d19121e2566 (patch)
tree80803048c903c424ed9f1200b5dc1a29ed3ff6b8 /src/base
parentdc8018a5c3482008232e6faaa2d96cf20aed7485 (diff)
downloadgem5-5592798865ece858bab2b444bc782d19121e2566.tar.xz
style: fix missing spaces in control statements
Result of running 'hg m5style --skip-all --fix-control -a'.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/atomicio.hh2
-rw-r--r--src/base/cp_annotate.cc2
-rw-r--r--src/base/fenv.c2
-rw-r--r--src/base/loader/elf_object.cc8
-rw-r--r--src/base/statistics.cc4
5 files changed, 9 insertions, 9 deletions
diff --git a/src/base/atomicio.hh b/src/base/atomicio.hh
index bfd1e35e5..016de932c 100644
--- a/src/base/atomicio.hh
+++ b/src/base/atomicio.hh
@@ -53,7 +53,7 @@ ssize_t atomic_write(int fd, const void *s, size_t n);
do { \
static const char msg[] = m; \
atomic_write(fd, msg, sizeof(msg) - 1); \
- } while(0)
+ } while (0)
/**
* Statically allocate a string and write it to STDERR.
diff --git a/src/base/cp_annotate.cc b/src/base/cp_annotate.cc
index 70ab31167..c62398def 100644
--- a/src/base/cp_annotate.cc
+++ b/src/base/cp_annotate.cc
@@ -1205,7 +1205,7 @@ CPA::serialize(CheckpointOut &cp) const
}
// qData (vector<AnnotateList>)
- for(x = 0; x < qData.size(); x++) {
+ for (x = 0; x < qData.size(); x++) {
if (!qData[x].size())
continue;
y = 0;
diff --git a/src/base/fenv.c b/src/base/fenv.c
index ed06e220d..8004beccc 100644
--- a/src/base/fenv.c
+++ b/src/base/fenv.c
@@ -47,7 +47,7 @@ int m5_fegetround()
{
int x;
int rm = fegetround();
- for(x = 0; x < 4; x++)
+ for (x = 0; x < 4; x++)
if (m5_round_ops[x] == rm)
return x;
abort();
diff --git a/src/base/loader/elf_object.cc b/src/base/loader/elf_object.cc
index c9684c42a..6bfc0e460 100644
--- a/src/base/loader/elf_object.cc
+++ b/src/base/loader/elf_object.cc
@@ -179,7 +179,7 @@ ElfObject::tryFile(const string &fname, size_t len, uint8_t *data)
// 2 == solaris, 3 == freebsd
data = elf_rawdata(section, NULL);
assert(data->d_buf);
- if(ehdr.e_ident[EI_DATA] == ELFDATA2LSB)
+ if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB)
osAbi = htole(((uint32_t*)data->d_buf)[4]);
else
osAbi = htobe(((uint32_t*)data->d_buf)[4]);
@@ -218,7 +218,7 @@ ElfObject::tryFile(const string &fname, size_t len, uint8_t *data)
result->_programHeaderCount = ehdr.e_phnum;
//Record the size of each entry
result->_programHeaderSize = ehdr.e_phentsize;
- if(result->_programHeaderCount) //If there is a program header table
+ if (result->_programHeaderCount) //If there is a program header table
{
//Figure out the virtual address of the header table in the
//final memory image. We use the program headers themselves
@@ -226,11 +226,11 @@ ElfObject::tryFile(const string &fname, size_t len, uint8_t *data)
GElf_Phdr phdr;
uint64_t e_phoff = ehdr.e_phoff;
result->_programHeaderTable = 0;
- for(int hdrnum = 0; hdrnum < result->_programHeaderCount; hdrnum++)
+ for (int hdrnum = 0; hdrnum < result->_programHeaderCount; hdrnum++)
{
gelf_getphdr(elf, hdrnum, &phdr);
//Check if we've found the segment with the headers in it
- if(phdr.p_offset <= e_phoff &&
+ if (phdr.p_offset <= e_phoff &&
phdr.p_offset + phdr.p_filesz > e_phoff)
{
result->_programHeaderTable =
diff --git a/src/base/statistics.cc b/src/base/statistics.cc
index 131c74566..b32dafb8c 100644
--- a/src/base/statistics.cc
+++ b/src/base/statistics.cc
@@ -364,9 +364,9 @@ HistStor::add(HistStor *hs)
squares += hs->squares;
samples += hs->samples;
- while(bucket_size > hs->bucket_size)
+ while (bucket_size > hs->bucket_size)
hs->grow_up();
- while(bucket_size < hs->bucket_size)
+ while (bucket_size < hs->bucket_size)
grow_up();
for (uint32_t i = 0; i < b_size; i++)