summaryrefslogtreecommitdiff
path: root/econserv.c
diff options
context:
space:
mode:
Diffstat (limited to 'econserv.c')
-rw-r--r--econserv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/econserv.c b/econserv.c
index 89d3ea9..f3f990e 100644
--- a/econserv.c
+++ b/econserv.c
@@ -27,7 +27,6 @@
#include <stddef.h>
#include <stdint.h>
#include <assert.h>
-#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
@@ -212,7 +211,7 @@ handle_input(struct ecs *ecs, char *in, int fd,
in.sin_addr.s_addr = ((struct sockaddr_in *) src_addr)->sin_addr.s_addr;
printf("got connect request\n");
if (connect(ecs->client_fd, (struct sockaddr *) &in, sizeof in) != 0) {
- fprintf(stderr, "failed to connect: %s\n", strerror(errno));
+ perror("Failed to connect");
close(ecs->client_fd);
ecs->client_fd = -1;
ecs->state = E_PSTAT_NOUSE;
@@ -347,7 +346,7 @@ int main(int argc, char *argv[])
}
if (select(maxfd + 1, &fds, NULL, NULL, NULL) <= 0) {
- fprintf(stderr, "select failed: %s", strerror(errno));
+ perror("Select failed");
continue;
}