diff options
Diffstat (limited to 'instr-daemon.c')
-rw-r--r-- | instr-daemon.c | 10 |
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); |