ii

My fork of https://tools.suckless.org/ii/
git clone https://git.inz.fi/ii
Log | Files | Refs | README | LICENSE

commit ab89c0c4f51e6b22ec6ba254e753b8b4a91a2096
parent 2e9a70e67ddcab24751f98411d6a1ff91c438e6a
Author: Nico Golde <nion@suckless.org>
Date:   Tue, 12 Jun 2007 11:05:33 +0200

regression fix
Diffstat:
Mii.c | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git 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) {