summaryrefslogtreecommitdiff
path: root/instr-daemon.c
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 /instr-daemon.c
parentb7d456868f90f6c6f763d18922be9f8fe6ce15e6 (diff)
run astyle
Diffstat (limited to 'instr-daemon.c')
-rw-r--r--instr-daemon.c10
1 files changed, 4 insertions, 6 deletions
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);