Improve VID/PID command argument handling in FTDI driver:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Fri, 12 Jun 2009 01:40:48 +0000 (01:40 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Fri, 12 Jun 2009 01:40:48 +0000 (01:40 +0000)
commitea95cdb8e2012b21cd3a12f7062e851178c7f455
tree14ec7031d9ee1ff5377c22b9de5d1060369837d2
parent70d853b9fa823bd973b71e7003679c001dfdf196
Improve VID/PID command argument handling in FTDI driver:
- Bug fix: Return a syntax error when less than two arguments are given.
- Bug fix: Use parse_u16 helper to ensure vales are parsed properly.
- Simplify loop termination logic by ensuring argc is always even.
- Move loop induction variable declaration to where it is used.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2215 b42882b7-edfa-0310-969c-e2dbd0fdcd60
src/jtag/ft2232.c