summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-23 22:47:42 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-23 22:47:42 +0000
commitdc575dc5bf8cb597a0e9a47794744ae6b1928087 (patch)
tree325ee3b79fe5801fd11a9cfa5e848ea15a52d5eb /src/server
parentf90d8fa45f2d4c9d4b7990f198b232ee55cbb4e1 (diff)
downloadopenocd+libswd-dc575dc5bf8cb597a0e9a47794744ae6b1928087.tar.gz
openocd+libswd-dc575dc5bf8cb597a0e9a47794744ae6b1928087.tar.bz2
openocd+libswd-dc575dc5bf8cb597a0e9a47794744ae6b1928087.tar.xz
openocd+libswd-dc575dc5bf8cb597a0e9a47794744ae6b1928087.zip
Remove whitespace that occurs before ')'.
- Replace '[ \t]*[)]' with ')'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2377 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/server')
-rw-r--r--src/server/gdb_server.c40
-rw-r--r--src/server/httpd.c16
-rw-r--r--src/server/server.c2
3 files changed, 29 insertions, 29 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 9b22ce27..00897153 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -319,9 +319,9 @@ int gdb_put_packet_inner(connection_t *connection, char *buffer, int len)
break;
if ((retval = gdb_get_char(connection, &reply)) != ERROR_OK)
return retval;
- if (reply == '$' ){
+ if (reply == '$'){
/* fix a problem with some IAR tools */
- gdb_putback_char(connection, reply );
+ gdb_putback_char(connection, reply);
LOG_DEBUG("Unexpected start of new packet");
break;
}
@@ -402,9 +402,9 @@ int gdb_put_packet_inner(connection_t *connection, char *buffer, int len)
log_remove_callback(gdb_log_callback, connection);
LOG_WARNING("negative reply, retrying");
}
- else if (reply == '$' ){
+ else if (reply == '$'){
LOG_ERROR("GDB missing ack(1) - assumed good");
- gdb_putback_char(connection, reply );
+ gdb_putback_char(connection, reply);
return ERROR_OK;
} else {
@@ -413,9 +413,9 @@ int gdb_put_packet_inner(connection_t *connection, char *buffer, int len)
return ERROR_SERVER_REMOTE_CLOSED;
}
}
- else if (reply == '$' ){
+ else if (reply == '$'){
LOG_ERROR("GDB missing ack(2) - assumed good");
- gdb_putback_char(connection, reply );
+ gdb_putback_char(connection, reply);
return ERROR_OK;
}
else
@@ -709,7 +709,7 @@ int gdb_target_callback_event_handler(struct target_s *target, enum target_event
int retval;
connection_t *connection = priv;
- target_handle_event(target, event );
+ target_handle_event(target, event);
switch (event)
{
case TARGET_EVENT_EARLY_HALTED:
@@ -719,7 +719,7 @@ int gdb_target_callback_event_handler(struct target_s *target, enum target_event
target_call_event_callbacks(target, TARGET_EVENT_GDB_END);
break;
case TARGET_EVENT_GDB_FLASH_ERASE_START:
- target_handle_event(target, TARGET_EVENT_OLD_gdb_program_config );
+ target_handle_event(target, TARGET_EVENT_OLD_gdb_program_config);
if ((retval = jtag_execute_queue()) != ERROR_OK)
{
return retval;
@@ -800,7 +800,7 @@ int gdb_new_connection(connection_t *connection)
*/
if (initial_ack != '+')
gdb_putback_char(connection, initial_ack);
- target_call_event_callbacks(gdb_service->target, TARGET_EVENT_GDB_ATTACH );
+ target_call_event_callbacks(gdb_service->target, TARGET_EVENT_GDB_ATTACH);
gdb_actual_connections++;
@@ -839,7 +839,7 @@ int gdb_connection_closed(connection_t *connection)
target_call_event_callbacks(gdb_service->target, TARGET_EVENT_GDB_END);
log_remove_callback(gdb_log_callback, connection);
- target_call_event_callbacks(gdb_service->target, TARGET_EVENT_GDB_DETACH );
+ target_call_event_callbacks(gdb_service->target, TARGET_EVENT_GDB_DETACH);
return ERROR_OK;
}
@@ -847,7 +847,7 @@ int gdb_connection_closed(connection_t *connection)
void gdb_send_error(connection_t *connection, uint8_t the_error)
{
char err[4];
- snprintf(err, 4, "E%2.2X", the_error );
+ snprintf(err, 4, "E%2.2X", the_error);
gdb_put_packet(connection, err, 3);
}
@@ -1360,7 +1360,7 @@ int gdb_step_continue_packet(connection_t *connection, target_t *target, char *p
if (packet[0] == 'c')
{
LOG_DEBUG("continue");
- target_handle_event(target, TARGET_EVENT_OLD_pre_resume );
+ target_handle_event(target, TARGET_EVENT_OLD_pre_resume);
retval = target_resume(target, current, address, 0, 0); /* resume at current address, don't handle breakpoints, not debugging */
}
else if (packet[0] == 's')
@@ -1872,7 +1872,7 @@ int gdb_v_packet(connection_t *connection, target_t *target, char *packet, int p
/* perform any target specific operations before the erase */
target_call_event_callbacks(gdb_service->target, TARGET_EVENT_GDB_FLASH_ERASE_START);
- result = flash_erase_address_range(gdb_service->target, addr, length );
+ result = flash_erase_address_range(gdb_service->target, addr, length);
target_call_event_callbacks(gdb_service->target, TARGET_EVENT_GDB_FLASH_ERASE_END);
/* perform erase */
@@ -1964,10 +1964,10 @@ int gdb_v_packet(connection_t *connection, target_t *target, char *packet, int p
int gdb_detach(connection_t *connection, target_t *target)
{
- switch (detach_mode )
+ switch (detach_mode)
{
case GDB_DETACH_RESUME:
- target_handle_event(target, TARGET_EVENT_OLD_pre_resume );
+ target_handle_event(target, TARGET_EVENT_OLD_pre_resume);
target_resume(target, 1, 0, 1, 0);
break;
@@ -2036,18 +2036,18 @@ int gdb_input_inner(connection_t *connection)
/* terminate with zero */
packet[packet_size] = 0;
- if (LOG_LEVEL_IS(LOG_LVL_DEBUG ) ){
- if (packet[0] == 'X' ){
+ if (LOG_LEVEL_IS(LOG_LVL_DEBUG)){
+ if (packet[0] == 'X'){
// binary packets spew junk into the debug log stream
char buf[ 50 ];
int x;
- for (x = 0 ; (x < 49) && (packet[x] != ':') ; x++ ){
+ for (x = 0 ; (x < 49) && (packet[x] != ':') ; x++){
buf[x] = packet[x];
}
buf[x] = 0;
- LOG_DEBUG("received packet: '%s:<binary-data>'", buf );
+ LOG_DEBUG("received packet: '%s:<binary-data>'", buf);
} else {
- LOG_DEBUG("received packet: '%s'", packet );
+ LOG_DEBUG("received packet: '%s'", packet);
}
}
diff --git a/src/server/httpd.c b/src/server/httpd.c
index e396bc36..26626008 100644
--- a/src/server/httpd.c
+++ b/src/server/httpd.c
@@ -111,7 +111,7 @@ static int httpd_Jim_Command_writeform(Jim_Interp *interp, int argc,
const char *script = alloc_printf("set dummy_val $httppostdata(%s); set dummy_val",
name);
- retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__ );
+ retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__);
free((void *) script);
if (retcode != JIM_OK)
return retcode;
@@ -152,7 +152,7 @@ httpd_Jim_Command_formfetch(Jim_Interp *interp,
const char *script = alloc_printf("set dummy_val $httppostdata(%s); set dummy_val",
name);
- int retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__ );
+ int retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__);
free((void *) script);
if (retcode != JIM_OK)
{
@@ -257,7 +257,7 @@ int handle_request(struct MHD_Connection * connection, const char * url)
const char *script = alloc_printf(
"global httpdata; source {%s}; set httpdata", url);
- retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__ );
+ retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__);
free((void *) script);
if (retcode == JIM_ERR)
@@ -415,8 +415,8 @@ static pthread_mutex_t mutex;
int httpd_start(void)
{
pthread_mutexattr_t attr;
- pthread_mutexattr_init(&attr );
- pthread_mutex_init(&mutex, &attr );
+ pthread_mutexattr_init(&attr);
+ pthread_mutex_init(&mutex, &attr);
int port = 8888;
LOG_USER("Launching httpd server on port %d", port);
@@ -446,16 +446,16 @@ int httpd_start(void)
void httpd_stop(void)
{
MHD_stop_daemon(d);
- pthread_mutex_destroy(&mutex );
+ pthread_mutex_destroy(&mutex);
}
void openocd_sleep_prelude(void)
{
- pthread_mutex_unlock(&mutex );
+ pthread_mutex_unlock(&mutex);
}
void openocd_sleep_postlude(void)
{
- pthread_mutex_lock(&mutex );
+ pthread_mutex_lock(&mutex);
}
diff --git a/src/server/server.c b/src/server/server.c
index af457814..3a3d33fa 100644
--- a/src/server/server.c
+++ b/src/server/server.c
@@ -528,7 +528,7 @@ int server_quit(void)
#ifdef _WIN32
WSACleanup();
- SetConsoleCtrlHandler(ControlHandler, FALSE );
+ SetConsoleCtrlHandler(ControlHandler, FALSE);
#endif
return ERROR_OK;