mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:54:41 +08:00
tekhex.c tidy writesym
Simplifies the code a little. No functional changes.
This commit is contained in:
parent
6ecc44f698
commit
b3ee98cda4
18
bfd/tekhex.c
18
bfd/tekhex.c
@ -736,22 +736,14 @@ writesym (char **dst, const char *sym)
|
||||
int len = (sym ? strlen (sym) : 0);
|
||||
|
||||
if (len >= 16)
|
||||
len = 16;
|
||||
else if (len == 0)
|
||||
{
|
||||
*p++ = '0';
|
||||
len = 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (len == 0)
|
||||
{
|
||||
*p++ = '1';
|
||||
sym = "$";
|
||||
len = 1;
|
||||
}
|
||||
else
|
||||
*p++ = digs[len];
|
||||
len = 1;
|
||||
sym = "$";
|
||||
}
|
||||
|
||||
*p++ = digs[len & 0xf];
|
||||
while (len--)
|
||||
*p++ = *sym++;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user