From 2cada217573443b13903b7241de8386159c18448 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Fri, 28 Jan 2022 16:25:40 +0100 Subject: [PATCH] [network] enum connection_basic_state -> connection_basic_state_T --- src/network/state.h | 6 ++++-- src/protocol/fsp/fsp.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/network/state.h b/src/network/state.h index 06a44d4b5..d03c060ca 100644 --- a/src/network/state.h +++ b/src/network/state.h @@ -116,13 +116,15 @@ enum connection_basic_state { S_FSP_OPEN_SESSION_UNKN = -100900, }; +typedef int connection_basic_state_T; + /** Either an ELinks internal status code or an error code from the * system. Use connection_state() or connection_state_for_errno() * to construct objects of this type. */ struct connection_state { /** An ELinks internal status code, or ::S_ERRNO if this * structure holds a system error instead. */ - enum connection_basic_state basic; + connection_basic_state_T basic; /** When #basic is ::S_ERRNO, syserr is the saved value of * errno. Otherwise, syserr should be 0. */ @@ -133,7 +135,7 @@ char *get_state_message(struct connection_state state, struct terminal *term); void done_state_message(void); static inline struct connection_state -connection_state(enum connection_basic_state basic) +connection_state(connection_basic_state_T basic) { struct connection_state state = {}; diff --git a/src/protocol/fsp/fsp.c b/src/protocol/fsp/fsp.c index c004f0e53..f363879fe 100644 --- a/src/protocol/fsp/fsp.c +++ b/src/protocol/fsp/fsp.c @@ -74,7 +74,7 @@ struct module fsp_protocol_module = struct_module( * - If an error occurs, the child process writes "text/x-error" * without newline to stderr, and an error code and a newline to * stdout. The error code is either "S" followed by errno or "I" - * followed by enum connection_basic_state. In particular, EPERM + * followed by connection_basic_state_T. In particular, EPERM * causes the parent process to prompt for username and password. * (In this, fsplib differs from libsmbclient, which uses EACCES if * authentication fails.)