]> git.sur5r.net Git - openocd/commitdiff
Fix compile error when _DEBUG_GDB_IO_ is set
authorJames Zhao <jamzhao@gmail.com>
Wed, 30 Nov 2011 22:23:24 +0000 (14:23 -0800)
committerØyvind Harboe <oyvindharboe@gmail.com>
Thu, 1 Dec 2011 06:12:00 +0000 (06:12 +0000)
Compile error is encountered when _DEBUG_GDB_IO_ is set,
due to duplicate variables.
Fixed by renaming the variable.

Change-Id: I729c06e317fdb899142c9ceaf543b7f580088807
Signed-off-by: James Zhao <jamzhao@gmail.com>
Reviewed-on: http://openocd.zylin.com/243
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
src/server/gdb_server.c

index 4dd9bd10aec81edf3b90ccdefd0b102df76fc6f1..93aa8edc5d753499bb5228799d7088e34088bcb9 100644 (file)
@@ -1076,10 +1076,10 @@ static int gdb_get_registers_packet(struct connection *connection,
 
 #ifdef _DEBUG_GDB_IO_
        {
-               char *reg_packet_p;
-               reg_packet_p = strndup(reg_packet, reg_packet_size);
-               LOG_DEBUG("reg_packet: %s", reg_packet_p);
-               free(reg_packet_p);
+               char *reg_packet_p_debug;
+               reg_packet_p_debug = strndup(reg_packet, reg_packet_size);
+               LOG_DEBUG("reg_packet: %s", reg_packet_p_debug);
+               free(reg_packet_p_debug);
        }
 #endif