summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorcashmere <cashmere@autistici.org>2026-06-30 12:46:20 +0200
committercashmere <cashmere@autistici.org>2026-06-30 12:46:20 +0200
commit12122eb6424c8a8a02f4b3352f88ec416197c0f2 (patch)
tree4845c1609d8ed3f2c53123002480a69660a619f3 /src/main.c
parente3593e212f1c47192f3ff606409d2f728cba8b27 (diff)
downloadtelnet-12122eb6424c8a8a02f4b3352f88ec416197c0f2.tar.gz
src/main.c: adjust error code handler
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index c978256..22b5e98 100644
--- a/src/main.c
+++ b/src/main.c
@@ -75,7 +75,7 @@ int main() {
addr.sin_addr.s_addr = INADDR_ANY; /* equals to 0.0.0.0 */
struct pollfd fds[256];
int sfd = establish_connection(addr);
- if (sfd == 1) {
+ if (sfd == -1) {
perror("could not establish connection");
return 1;
}