mitmd

mitm TCP connections
Log | Files | Refs | README

commit 4790e9f5e81172d9ea31e6bb8c2e20cf447db883
parent 2dc37f0f2b99fdadc1a0cd894011a760c3f4468d
Author: hhvn <dev@hhvn.uk>
Date:   Wed, 16 Jun 2021 22:59:28 +0100

mitmd.c: remove redundant gotos

Diffstat:
Mmitmd.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/mitmd.c b/mitmd.c @@ -114,8 +114,6 @@ mitm(int client, char *host, char *port) { } switch (pid = fork()) { - case -1: - goto cleanup; case 0: while (read_line(client, bufc, sizeof(bufc)) != 0) { printf("%03d%s%03d %s", client, CLIENT_STYLE, remote, bufc); @@ -127,7 +125,8 @@ mitm(int client, char *host, char *port) { printf("%03d%s%03d %s", client, REMOTE_STYLE, remote, bufr); write(client, bufr, strlen(bufr)); } - goto cleanup; + case -1: + break; } cleanup: