Further cleanup to MIPS target read/write memory function:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Fri, 12 Jun 2009 04:14:28 +0000 (04:14 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Fri, 12 Jun 2009 04:14:28 +0000 (04:14 +0000)
commit7fdce0e8bcee36a4fa183c8fc579e7d60d521333
tree7b8dd74ba86cc2ada90a6ed54a2734ad69c8f36f
parentc6e80f63a3955baed6666e966ab1dd3950ea91b8
Further cleanup to MIPS target read/write memory function:
- Move the mips32_..._read_mem calls to top-level of read_mem function.
- Change: Only perform mips_m4k_read_mem conversion when retval == ERROR_OK.
   - Prevents pointless conversions of bogus read values after failures.
- Eliminate retval variable from mips_m4k_write_mem; return directly.
- Move declaration of retval variable to point of first use.
- Remove the now redundant switch statements testing size:
  - argument sanitizing already covers these cases.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2220 b42882b7-edfa-0310-969c-e2dbd0fdcd60
src/target/mips_m4k.c