ii

git clone https://orangeshoelaces.net/git/ii.git

ab89c0c4f51e6b22ec6ba254e753b8b4a91a2096

Author: Nico Golde on 06/12/2007

Committer: Nico Golde on 06/12/2007

regression fix

Stats

ii.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

Patch

diff --git a/ii.c b/ii.c
index 232a7b2..f0c9dcc 100644
--- a/ii.c
+++ b/ii.c
@@ -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) {