From: Ian Jackson Date: Mon, 15 Aug 2022 17:50:41 +0000 (+0100) Subject: prefork-interp: Rename read_greeting (from protocol_greeting) X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;ds=sidebyside;h=e87a0b5881f1a5214d22c415a4ffa3144d681312;p=chiark-utils.git prefork-interp: Rename read_greeting (from protocol_greeting) This is clearer. Signed-off-by: Ian Jackson --- diff --git a/cprogs/prefork-interp.c b/cprogs/prefork-interp.c index 9b773a4..c62f00a 100644 --- a/cprogs/prefork-interp.c +++ b/cprogs/prefork-interp.c @@ -299,7 +299,7 @@ static void protocol_read(void *data, size_t sz) { } // Returns 0 if OK, error msg if peer was garbage. -static const char *protocol_greeting(void) { +static const char *read_greeting(void) { char got_magic[sizeof(header_magic)]; if (protocol_read_maybe(&got_magic, sizeof(got_magic)) < 0) @@ -336,7 +336,7 @@ static FILE *connect_existing(void) { call_sock = call_sock_from_fd(fd); fd = -1; - if (protocol_greeting()) + if (read_greeting()) goto x_garbage; return call_sock; @@ -418,7 +418,7 @@ static void connect_or_spawn(void) { (long)setup_pid, (long)got); if (status != 0) propagate_exit_status(status, "setup"); - const char *emsg = protocol_greeting(); + const char *emsg = read_greeting(); if (emsg) die("setup failed: %s", emsg); close(lockfd);