Skip to content

Commit b77862e

Browse files
FelipeMdeOmkj
authored andcommitted
Use explicit void in no-argument function definitions
Replace empty parameter lists with (void) in static function definitions to conform to the C99/C11 standard, which treats func() as an unprototyped function accepting any arguments, while func(void) explicitly declares no parameters.
1 parent 06bbd04 commit b77862e

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/common-kex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ void send_msg_kexinit() {
117117

118118
}
119119

120-
static void switch_keys() {
120+
static void switch_keys(void) {
121121
TRACE2(("enter switch_keys"))
122122
if (!(ses.kexstate.sentkexinit && ses.kexstate.recvkexinit)) {
123123
dropbear_exit("Unexpected newkeys message");

src/common-session.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ void ignore_recv_response() {
503503
TRACE(("Ignored msg_request_response"))
504504
}
505505

506-
static void send_msg_keepalive() {
506+
static void send_msg_keepalive(void) {
507507
time_t old_time_idle = ses.last_packet_time_idle;
508508
struct Channel *chan = get_any_ready_channel();
509509

src/dbrandom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ void addrandom(const unsigned char * buf, unsigned int len)
129129
sha256_done(&hs, hashpool);
130130
}
131131

132-
static void write_urandom()
132+
static void write_urandom(void)
133133
{
134134
#if DROPBEAR_FUZZ
135135
if (fuzz.fuzzing) {

src/packet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ static int packet_is_okay_kex(unsigned char type) {
475475
return 1;
476476
}
477477

478-
static void enqueue_reply_packet() {
478+
static void enqueue_reply_packet(void) {
479479
struct packetlist * new_item = NULL;
480480
new_item = m_malloc(sizeof(struct packetlist));
481481
new_item->next = NULL;

src/svr-runopts.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static void printhelp(const char * progname);
3838
static void addportandaddress(const char* spec);
3939
static void loadhostkey(const char *keyfile, int fatal_duplicate);
4040
static void addhostkey(const char *keyfile);
41-
static void load_banner();
41+
static void load_banner(void);
4242

4343
static void printhelp(const char * progname) {
4444

@@ -766,7 +766,7 @@ void load_all_hostkeys() {
766766
}
767767
}
768768

769-
static void load_banner() {
769+
static void load_banner(void) {
770770
struct stat buf;
771771
if (stat(svr_opts.bannerfile, &buf) != 0) {
772772
dropbear_log(LOG_WARNING, "Error opening banner file '%s'",

0 commit comments

Comments
 (0)