mirror of
https://github.com/clearml/dropbear
synced 2025-01-31 02:46:58 +00:00
Add more ATTRIB_NORETURN annotations, from Thorsten Horstmann
This commit is contained in:
parent
9adfff5c1a
commit
1809f741cb
@ -38,10 +38,10 @@
|
|||||||
#include "agentfwd.h"
|
#include "agentfwd.h"
|
||||||
#include "crypto_desc.h"
|
#include "crypto_desc.h"
|
||||||
|
|
||||||
static void cli_remoteclosed();
|
static void cli_remoteclosed() ATTRIB_NORETURN;
|
||||||
static void cli_sessionloop();
|
static void cli_sessionloop();
|
||||||
static void cli_session_init();
|
static void cli_session_init();
|
||||||
static void cli_finished();
|
static void cli_finished() ATTRIB_NORETURN;
|
||||||
static void recv_msg_service_accept(void);
|
static void recv_msg_service_accept(void);
|
||||||
static void cli_session_cleanup(void);
|
static void cli_session_cleanup(void);
|
||||||
static void recv_msg_global_request_cli(void);
|
static void recv_msg_global_request_cli(void);
|
||||||
|
@ -4,8 +4,16 @@
|
|||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
/* portability macros for compiler-specific code attributes */
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#define ATTRIB_NORETURN __attribute__((noreturn))
|
||||||
|
#else
|
||||||
|
#define ATTRIB_NORETURN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* this is the default LibTomCrypt macro */
|
/* this is the default LibTomCrypt macro */
|
||||||
void crypt_argchk(char *v, char *s, int d);
|
void crypt_argchk(char *v, char *s, int d) ATTRIB_NORETURN;
|
||||||
#define LTC_ARGCHK(x) if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); }
|
#define LTC_ARGCHK(x) if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); }
|
||||||
#define LTC_ARGCHKVD(x) LTC_ARGCHK(x)
|
#define LTC_ARGCHKVD(x) LTC_ARGCHK(x)
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ extern int sessinitdone; /* Is set to 0 somewhere */
|
|||||||
extern int exitflag;
|
extern int exitflag;
|
||||||
|
|
||||||
void common_session_init(int sock_in, int sock_out);
|
void common_session_init(int sock_in, int sock_out);
|
||||||
void session_loop(void(*loophandler)());
|
void session_loop(void(*loophandler)()) ATTRIB_NORETURN;
|
||||||
void session_cleanup();
|
void session_cleanup();
|
||||||
void send_session_identification();
|
void send_session_identification();
|
||||||
void send_msg_ignore();
|
void send_msg_ignore();
|
||||||
@ -55,12 +55,12 @@ const char* get_user_shell();
|
|||||||
void fill_passwd(const char* username);
|
void fill_passwd(const char* username);
|
||||||
|
|
||||||
/* Server */
|
/* Server */
|
||||||
void svr_session(int sock, int childpipe);
|
void svr_session(int sock, int childpipe) ATTRIB_NORETURN;
|
||||||
void svr_dropbear_exit(int exitcode, const char* format, va_list param) ATTRIB_NORETURN;
|
void svr_dropbear_exit(int exitcode, const char* format, va_list param) ATTRIB_NORETURN;
|
||||||
void svr_dropbear_log(int priority, const char* format, va_list param);
|
void svr_dropbear_log(int priority, const char* format, va_list param);
|
||||||
|
|
||||||
/* Client */
|
/* Client */
|
||||||
void cli_session(int sock_in, int sock_out);
|
void cli_session(int sock_in, int sock_out) ATTRIB_NORETURN;
|
||||||
void cleantext(unsigned char* dirtytext);
|
void cleantext(unsigned char* dirtytext);
|
||||||
|
|
||||||
/* crypto parameters that are stored individually for transmit and receive */
|
/* crypto parameters that are stored individually for transmit and receive */
|
||||||
|
Loading…
Reference in New Issue
Block a user