Skip to content

Commit bd0d728

Browse files
committed
Refactor: some more cleanups (unused or shall-be-static functions)
Signed-off-by: Jan Pokorný <[email protected]>
1 parent c9954d1 commit bd0d728

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

src/request.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ void *add_req(
5050
return rp;
5151
}
5252

53+
/* XXX UNUSED */
5354
int get_req_id(const void *rp)
5455
{
5556
if (!rp)

src/request.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ void *add_req(struct ticket_config *tk, struct client *req_client,
6262
*/
6363
void foreach_tkt_req(struct booth_config *conf_ptr, struct ticket_config *tk,
6464
req_fp f);
65+
66+
/* XXX UNUSED */
6567
int get_req_id(const void *rp);
6668

6769
#endif /* _REQUEST_H */

src/ticket.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ void disown_ticket(struct ticket_config *tk)
545545
get_time(&tk->term_expires);
546546
}
547547

548+
/* XXX UNUSED */
548549
int disown_if_expired(struct ticket_config *tk)
549550
{
550551
if (is_past(&tk->term_expires) ||
@@ -985,7 +986,7 @@ static void handle_resends(struct booth_config *conf_ptr,
985986
resend_msg(conf_ptr, tk);
986987
}
987988

988-
int postpone_ticket_processing(struct ticket_config *tk)
989+
static int postpone_ticket_processing(struct ticket_config *tk)
989990
{
990991
extern timetype start_time;
991992

src/ticket.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ extern int TIME_RES;
9595

9696
void save_committed_tkt(struct ticket_config *tk);
9797
void disown_ticket(struct ticket_config *tk);
98+
99+
/* XXX UNUSED */
98100
int disown_if_expired(struct ticket_config *tk);
99101

100102
/**
@@ -125,9 +127,6 @@ int check_ticket(struct booth_config *conf_ptr, const char *ticket,
125127
int check_site(struct booth_config *conf_ptr, const char *site,
126128
int *local);
127129

128-
int grant_ticket(struct ticket_config *ticket);
129-
int revoke_ticket(struct ticket_config *ticket);
130-
131130
/**
132131
* @internal
133132
* Second stage of incoming datagram handling (after authentication)
@@ -181,7 +180,6 @@ int find_ticket_by_name(struct booth_config *conf_ptr,
181180
const char *ticket, struct ticket_config **found);
182181

183182
void set_ticket_wakeup(struct ticket_config *tk);
184-
int postpone_ticket_processing(struct ticket_config *tk);
185183

186184
/**
187185
* @internal

src/transport.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,8 @@ static int do_write(int fd, void *buf, size_t count)
372372
return 0;
373373
}
374374

375-
376375
/* Only used for client requests (tcp) */
377-
int read_client(struct client *req_cl)
376+
static int read_client(struct client *req_cl)
378377
{
379378
char *msg;
380379
struct boothc_header *header;
@@ -424,7 +423,6 @@ int read_client(struct client *req_cl)
424423
return 0;
425424
}
426425

427-
428426
/* Only used for client requests (tcp) */
429427
static void process_connection(struct booth_config *conf_ptr, int ci)
430428
{

src/transport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ typedef struct booth_transport booth_transport_table_t[TRANSPORT_ENTRIES];
7272
int find_myself(struct booth_config *conf_ptr, struct booth_site **mep,
7373
int fuzzy_allowed);
7474

75-
int read_client(struct client *req_cl);
7675
int check_boothc_header(struct boothc_header *data, int len_incl_data);
7776

7877
int setup_tcp_listener(int test_only);

0 commit comments

Comments
 (0)