This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] STREQ/STREQN->strcmp/strncmp in mcore-rom.c
- To: gdb-patches at sources dot redhat dot com
- Subject: [RFA] STREQ/STREQN->strcmp/strncmp in mcore-rom.c
- From: Keith Seitz <keiths at cygnus dot com>
- Date: Tue, 23 Jan 2001 13:11:06 -0800 (PST)
Ok, pretty obvious. Just trying to cleanup a few little things to get
back into the swing of things...
2001-01-23 Keith Seitz <keiths@cygnus.com>
* mcore-rom.c (picobug_dumpregs): Move from STREQN to strnmcp.
Move from STREQ to strcmp.
Index: mcore-rom.c
===================================================================
RCS file: /cvs/src/src/gdb/mcore-rom.c,v
retrieving revision 1.2
diff -p -r1.2 mcore-rom.c
*** mcore-rom.c 2000/07/30 01:48:26 1.2
--- mcore-rom.c 2001/01/23 20:57:24
*************** picobug_dumpregs (void)
*** 100,106 ****
if (strchr (p, '-'))
{
/* got a range. either r0-r7, r8-r15 or ss0-ss4 */
! if (STREQN (p, "r0", 2) || STREQN (p, "r8", 2))
{
int rn = (p[1] == '0' ? 0 : 8);
int i = 0;
--- 100,106 ----
if (strchr (p, '-'))
{
/* got a range. either r0-r7, r8-r15 or ss0-ss4 */
! if (strncmp (p, "r0", 2) == 0 || strncmp (p, "r8", 2) == 0)
{
int rn = (p[1] == '0' ? 0 : 8);
int i = 0;
*************** picobug_dumpregs (void)
*** 114,120 ****
i++;
}
}
! else if (STREQN (p, "ss", 2))
{
/* get the next five values, ignoring the first */
int rn;
--- 114,120 ----
i++;
}
}
! else if (strncmp (p, "ss", 2) == 0)
{
/* get the next five values, ignoring the first */
int rn;
*************** picobug_dumpregs (void)
*** 143,149 ****
{
for (i = 0; i < NUM_REGS; i++)
{
! if (picobug_regnames[i] && STREQ (picobug_regnames[i], name))
break;
}
--- 143,150 ----
{
for (i = 0; i < NUM_REGS; i++)
{
! if (picobug_regnames[i]
! && strcmp (picobug_regnames[i], name) == 0)
break;
}