2011-02-26 Michael Snyder <msnyder@vmware.com>

* utils.c (decimal2str): Eliminate dead code and dead param.
	(pulongest): Drop dead param from call to decimal2str.
	(plongest): Ditto.
This commit is contained in:
Michael Snyder 2011-02-26 18:53:44 +00:00
parent 2279eaad98
commit 238f1c7460
2 changed files with 12 additions and 7 deletions

View file

@ -1,3 +1,9 @@
2011-02-26 Michael Snyder <msnyder@vmware.com>
* utils.c (decimal2str): Eliminate dead code and dead param.
(pulongest): Drop dead param from call to decimal2str.
(plongest): Ditto.
2011-02-24 Joel Brobecker <brobecker@adacore.com>
Revert the following patch (not approved yet):

View file

@ -256,14 +256,15 @@ xsnprintf (char *str, size_t size, const char *format, ...)
}
static char *
decimal2str (char *sign, ULONGEST addr, int width)
decimal2str (char *sign, ULONGEST addr)
{
/* Steal code from valprint.c:print_decimal(). Should this worry
about the real size of addr as the above does? */
unsigned long temp[3];
char *str = get_cell ();
int i = 0;
int width;
do
{
temp[i] = addr % (1000 * 1000 * 1000);
@ -274,8 +275,6 @@ decimal2str (char *sign, ULONGEST addr, int width)
while (addr != 0 && i < (sizeof (temp) / sizeof (temp[0])));
width = 9;
if (width < 0)
width = 0;
switch (i)
{
@ -304,7 +303,7 @@ decimal2str (char *sign, ULONGEST addr, int width)
char *
pulongest (ULONGEST u)
{
return decimal2str ("", u, 0);
return decimal2str ("", u);
}
/* %d for LONGEST. The result is stored in a circular static buffer,
@ -314,9 +313,9 @@ char *
plongest (LONGEST l)
{
if (l < 0)
return decimal2str ("-", -l, 0);
return decimal2str ("-", -l);
else
return decimal2str ("", l, 0);
return decimal2str ("", l);
}
/* Eliminate warning from compiler on 32-bit systems. */