diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-02-28 22:00:45 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-02-28 22:00:45 +0000 |
commit | 9f72fee2a6fb291aae34d0956f53231c2b17bea3 (patch) | |
tree | fc5c1c465418d6fff423d3d7569f804dfda7936f /gdb/gdbserver/utils.c | |
parent | fb6a3ed3936ceb4a40d9a3b8ee53ebc561e50431 (diff) | |
download | gdb-9f72fee2a6fb291aae34d0956f53231c2b17bea3.zip gdb-9f72fee2a6fb291aae34d0956f53231c2b17bea3.tar.gz gdb-9f72fee2a6fb291aae34d0956f53231c2b17bea3.tar.bz2 |
2011-02-28 Michael Snyder <msnyder@vmware.com>
* utils.c (decimal2str): Initialize 'width' to nine, then
don't mess with it.
Diffstat (limited to 'gdb/gdbserver/utils.c')
-rw-r--r-- | gdb/gdbserver/utils.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/gdbserver/utils.c b/gdb/gdbserver/utils.c index 45d032c..78ae6f7 100644 --- a/gdb/gdbserver/utils.c +++ b/gdb/gdbserver/utils.c @@ -263,19 +263,16 @@ decimal2str (char *sign, ULONGEST addr) unsigned long temp[3]; char *str = get_cell (); int i = 0; - int width; + int width = 9; do { temp[i] = addr % (1000 * 1000 * 1000); addr /= (1000 * 1000 * 1000); i++; - width -= 9; } while (addr != 0 && i < (sizeof (temp) / sizeof (temp[0]))); - width = 9; - switch (i) { case 1: |