From 5eedf3e1cef2f2b440519f867c9cb449f616b8cd Mon Sep 17 00:00:00 2001 From: ntfreak Date: Thu, 10 Jan 2008 19:29:52 +0000 Subject: - added faster gdb packet handling (thanks to oyvind harboe for the patch) - code reformat git-svn-id: svn://svn.berlios.de/openocd/trunk@251 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/helper/command.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/helper/command.c') diff --git a/src/helper/command.c b/src/helper/command.c index e9ea0692..afd86672 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -79,12 +79,12 @@ int build_unique_lengths(command_context_t *context, command_t *commands) /* Avoid evaluating this each time we add a command. Reduces overhead from O(n^2) to O(n). * Makes a difference on ARM7 types machines and is not observable on GHz machines. */ -static int unique_length_dirty=1; +static int unique_length_dirty = 1; command_t* register_command(command_context_t *context, command_t *parent, char *name, int (*handler)(struct command_context_s *context, char* name, char** args, int argc), enum command_mode mode, char *help) { command_t *c, *p; - unique_length_dirty=1; + unique_length_dirty = 1; if (!context || !name) return NULL; @@ -138,7 +138,7 @@ command_t* register_command(command_context_t *context, command_t *parent, char int unregister_command(command_context_t *context, char *name) { - unique_length_dirty=1; + unique_length_dirty = 1; command_t *c, *p = NULL, *c2; @@ -316,7 +316,7 @@ int find_and_run_command(command_context_t *context, command_t *commands, char * if (unique_length_dirty) { - unique_length_dirty=0; + unique_length_dirty = 0; /* update unique lengths */ build_unique_lengths(context, context->commands); } -- cgit v1.2.3