From dd2b5569cecd199ec0e0a7c9f8be110c5373c0e5 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 27 Aug 2023 09:36:37 +0100 Subject: [PATCH] Remove a couple of double-typedefs. Experimenting with different compile flags pointed out two instances of typedefing the same name twice (though benignly, with the same definition as well). PsocksDataSink was typedefed a couple of lines above its struct definition and then again _with_ its struct definition; cliloop_continue_t was typedefed in unix/platform.h and didn't need defining again in unix/psocks.c. (cherry picked from commit 3d3400788972183b58915e6d62ff37fe9d469083) --- psocks.h | 4 ++-- unix/psocks.c | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/psocks.h b/psocks.h index d1120a36..8ba3b2f2 100644 --- a/psocks.h +++ b/psocks.h @@ -6,10 +6,10 @@ typedef struct PsocksDataSink PsocksDataSink; /* indices into PsocksDataSink arrays */ typedef enum PsocksDirection { UP, DN } PsocksDirection; -typedef struct PsocksDataSink { +struct PsocksDataSink { void (*free)(PsocksDataSink *); BinarySink *s[2]; -} PsocksDataSink; +}; static inline void pds_free(PsocksDataSink *pds) { pds->free(pds); } diff --git a/unix/psocks.c b/unix/psocks.c index 748790b8..6b30dc16 100644 --- a/unix/psocks.c +++ b/unix/psocks.c @@ -160,9 +160,6 @@ static bool psocks_continue(void *ctx, bool found_any_fd, return still_running; } -typedef bool (*cliloop_continue_t)(void *ctx, bool found_any_fd, - bool ran_any_callback); - int main(int argc, char **argv) { psocks_state *ps = psocks_new(&platform);