- if((srv = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
- fprintf(stderr, "sic: cannot connect host '%s'\n", host);
- exit(EXIT_FAILURE);
- }
- if (NULL == (hp = gethostbyname(host))) {
- fprintf(stderr, "sic: cannot resolve hostname '%s'\n", host);
- exit(EXIT_FAILURE);
- }
+ if((srv = socket(AF_INET, SOCK_STREAM, 0)) < 0)
+ eprint("sic: cannot connect host '%s'\n", host);
+ if(NULL == (hp = gethostbyname(host)))
+ eprint("sic: cannot resolve hostname '%s'\n", host);