[Openocd-development] svn code review part 2

2009-08-24 Thread Steve Grubb
Hello, This is my last set of findings from looking through the code in svn. This set mostly concentrates on variable tests that are unnecessary or could be copy and paste issues. In src/helper/jim.c at line 6066 we find this code: if (end) { then at 6071, we find this: } else if (!end && inde

[Openocd-development] svn code review

2009-08-23 Thread Steve Grubb
Hello, I was looking though the code in svn and found a couple items that might warrant attention. In src/jtag/arm-jtag-ew.c around line 428. There is a variable initialized here: uint8_t outp_en = 0; and then at 428 is this: outp_en &= ~srst_mask; Which is the same as outp_en = 0 & ~srst_m

[Openocd-development] svn memleak patch

2009-08-23 Thread Steve Grubb
Hello, I was looking through svn code and found several memory leaks. Not sure if this is the preferred fix, but it should show you what I was looking at. Signed-off-by: Steve Grubb --- diff -urp openocd.orig/src/helper/command.c openocd/src/helper/command.c --- openocd.orig/src/helper