summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-08-17 08:16:16 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-08-17 08:16:16 -0400
commitfcb2f1c3eb72ec2a9c8f85edc394efde2c0178c8 (patch)
tree36e4b9066a838e2ffb1af13d0e7b1408f216afda
parentb7d456868f90f6c6f763d18922be9f8fe6ce15e6 (diff)
run astyle
-rw-r--r--error_utils.c4
-rw-r--r--flash.c6
-rw-r--r--instr-daemon.c10
-rw-r--r--parser.c16
4 files changed, 18 insertions, 18 deletions
diff --git a/error_utils.c b/error_utils.c
index e6adb6e..405401d 100644
--- a/error_utils.c
+++ b/error_utils.c
@@ -496,8 +496,8 @@ void get_error_text(gchar **response, int error_num)
break;
case NetworkNotFound:
- format_error_text(response,-240,"Network not found.");
- break;
+ format_error_text(response,-240,"Network not found.");
+ break;
default:
diff --git a/flash.c b/flash.c
index ee0ea17..500ad96 100644
--- a/flash.c
+++ b/flash.c
@@ -20,7 +20,7 @@ void writeUserBlock(FlashStruct *mem, int addr, int numbytes)
// so that entire struct will be written,
// instead of just the requested range
- // All writing should be done in a super-safe
+ // All writing should be done in a super-safe
// way. Non-corruption, even during a power-off transient,
// is the priority here. We do not want instruments
// losing configuration data ever, because that
@@ -29,7 +29,9 @@ void writeUserBlock(FlashStruct *mem, int addr, int numbytes)
void initFlash(FlashStruct *mem)
{
- if (readUserBlock(mem) > 0) return;
+ if (readUserBlock(mem) > 0) {
+ return;
+ }
// uninitialized device!
mem->flash_start = (char) 99;
diff --git a/instr-daemon.c b/instr-daemon.c
index ad63329..ab8596b 100644
--- a/instr-daemon.c
+++ b/instr-daemon.c
@@ -43,9 +43,8 @@ stdinAvailable (GIOChannel *source, GIOCondition condition, gpointer data)
if(!strncmp(tmp, "..", size-1)) {
//final reallocation of the buffer to accomodate the whole string
buffer=realloc(buffer,allocated+1);
- if(buffer==NULL)
- {
- g_printerr("realloc FAILED! Exiting!");
+ if(buffer==NULL) {
+ g_printerr("realloc FAILED! Exiting!");
exit(-1);
}
buffer[allocated] = '\0';
@@ -77,9 +76,8 @@ stdinAvailable (GIOChannel *source, GIOCondition condition, gpointer data)
//allocate on the heap. buffer is NULL the first time
buffer=realloc(buffer, allocated+size);
- if(buffer==NULL)
- {
- g_printerr("realloc FAILED! Exiting!");
+ if(buffer==NULL) {
+ g_printerr("realloc FAILED! Exiting!");
exit(-1);
}
memcpy(buffer+allocated, tmp, size);
diff --git a/parser.c b/parser.c
index 43c40ac..5ca1810 100644
--- a/parser.c
+++ b/parser.c
@@ -1044,20 +1044,20 @@ static int Go_sys_net_91(gchar **response, int channel, char *loc_string,char *s
{
nicinfo info;
- switch (command_type) {
- case query_simple:
+ switch (command_type) {
+ case query_simple:
if (nicutils_infofordefaultroute(&info)) {
*response = g_strdup_printf ("MAC address: %s, IP address: %s", info.mac, info.ip);
return OK;
} else {
- return NetworkNotFound;
+ return NetworkNotFound;
}
- break;
+ break;
- default:
- return SyntaxError;
- break;
- }
+ default:
+ return SyntaxError;
+ break;
+ }
}