[hackers] [ii] regression fix

From: Nico Golde <nion_AT_suckless.org>
Date: Tue Jun 12 11:10:24 2007

changeset: 65:5024361b350e
tag: tip
user: Nico Golde <nion_AT_suckless.org>
date: Tue Jun 12 11:05:33 2007 +0200
summary: regression fix

diff -r f2c7dd7860c5 -r 5024361b350e ii.c
--- a/ii.c Thu May 03 19:06:39 2007 +0200
+++ b/ii.c Tue Jun 12 11:05:33 2007 +0200
@@ -3,7 +3,6 @@
  * (C)opyright MMV-MMVII Nico Golde <nico at ngolde dot de>
  * See LICENSE file for license details.
  */
-
 #include <errno.h>
 #include <netdb.h>
 #include <sys/types.h>
@@ -103,8 +102,7 @@ static int open_channel(char *name) {
         return open(infile, O_RDONLY | O_NONBLOCK, 0);
 }
 
-static void add_channel(char *name)
-{
+static void add_channel(char *name) {
         Channel *c;
         int fd;
 
@@ -114,8 +112,8 @@ static void add_channel(char *name)
 
         fd = open_channel(name);
         if(fd == -1) {
- perror("ii: cannot create in channel");
- return;
+ printf("ii: exiting, cannot create in channel: %s\n", name);
+ exit(EXIT_FAILURE);
         }
         c = calloc(1, sizeof(Channel));
         if(!c) {
Received on Tue Jun 12 2007 - 11:10:24 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:57:18 UTC