Remove unneeded zero termination of received packet

v2:
  removed curly braces around single statement if-block

packet[] has already been zero terminated in gdb_input_inner()
This change is necessary in order to make packet[] "const".

Change-Id: I978bbe52d151a63574db77fb747f596da256d377
Signed-off-by: Christian Eggers <ceggers@gmx.de>
Reviewed-on: http://openocd.zylin.com/1922
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
Christian Eggers 2014-02-03 20:13:54 +01:00 committed by Spencer Oliver
parent d0507207ab
commit 6fcaa4ae8f
1 changed files with 2 additions and 3 deletions

View File

@ -1522,10 +1522,9 @@ static int gdb_step_continue_packet(struct connection *connection,
LOG_DEBUG("-");
if (packet_size > 1) {
packet[packet_size] = 0;
if (packet_size > 1)
address = strtoul(packet + 1, NULL, 16);
} else
else
current = 1;
gdb_running_type = packet[0];