From 21b97fb4664f601446c40005eca109bf0bb3e29e Mon Sep 17 00:00:00 2001 From: Tobias Girstmair Date: Mon, 20 May 2024 17:49:06 +0200 Subject: [PATCH] simplify error messages for non-syscalls makes no sense to simulate perror for that kind of error. --- ircpipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ircpipe.c b/ircpipe.c index bc04634..89baa76 100644 --- a/ircpipe.c +++ b/ircpipe.c @@ -159,7 +159,7 @@ int irc_answer(const sock_t sock, char *buf, const unsigned int command) { if (strncmp(line, "ERROR ", 6)==0) seen |= ERRS; if (seen & ERRS) { - fprintf(stderr, __FILE__ ":%d: %s\n", __LINE__, line); + fprintf(stderr, "IRC error: %s\n", line); exit(1); } @@ -302,7 +302,7 @@ int irc_poll(const sock_t sock, const int infd, const int outfd) { if (want_pong && irc_time() - recv_ts > PING_INTERVAL + PONG_TIMEOUT) { /* pong timeout reached, abort. */ - fprintf(stderr, __FILE__ ":%d: %s\n", __LINE__, "PONG timeout"); + fprintf(stderr, "PONG timeout"); return -1; } else if (!want_pong && irc_time() - recv_ts > PING_INTERVAL) { /* haven't rx'd anything in a while, sending ping. */ -- 2.39.3