diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-04-02 05:30:16 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-04-02 05:30:16 +0000 |
commit | 12c4cbd553579257a4902267b2301984434cec7b (patch) | |
tree | b6228ef9e739eb92a626f7d837f223f812ec2b28 /sim/common/hw-base.c | |
parent | 4368ebebd815a95ace43dba87fbe800a37d314cf (diff) | |
download | gdb-12c4cbd553579257a4902267b2301984434cec7b.zip gdb-12c4cbd553579257a4902267b2301984434cec7b.tar.gz gdb-12c4cbd553579257a4902267b2301984434cec7b.tar.bz2 |
sim: fix up style a bit
This touches up the code a bit to match GNU style. No functional changes.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim/common/hw-base.c')
-rw-r--r-- | sim/common/hw-base.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/sim/common/hw-base.c b/sim/common/hw-base.c index 4fe3bde..88e493e 100644 --- a/sim/common/hw-base.c +++ b/sim/common/hw-base.c @@ -40,7 +40,8 @@ #include "hw-config.h" -struct hw_base_data { +struct hw_base_data +{ int finished_p; const struct hw_descriptor *descriptor; hw_delete_callback *to_delete; @@ -80,14 +81,16 @@ generic_hw_unit_decode (struct hw *bus, return -1; unit++; } - if (nr_cells < max_nr_cells) { - /* shift everything to correct position */ - int i; - for (i = 1; i <= nr_cells; i++) - phys->cells[max_nr_cells - i] = phys->cells[nr_cells - i]; - for (i = 0; i < (max_nr_cells - nr_cells); i++) - phys->cells[i] = 0; - } + if (nr_cells < max_nr_cells) + { + /* shift everything to correct position */ + int i; + + for (i = 1; i <= nr_cells; i++) + phys->cells[max_nr_cells - i] = phys->cells[nr_cells - i]; + for (i = 0; i < (max_nr_cells - nr_cells); i++) + phys->cells[i] = 0; + } phys->nr_cells = max_nr_cells; return max_nr_cells; } @@ -124,10 +127,11 @@ generic_hw_unit_encode (struct hw *bus, { for (; i < phys->nr_cells; i++) { - if (pos != buf) { - strcat(pos, ","); - pos = strchr(pos, '\0'); - } + if (pos != buf) + { + strcat(pos, ","); + pos = strchr(pos, '\0'); + } if (phys->cells[i] < 10) sprintf (pos, "%ld", (unsigned long)phys->cells[i]); else |