respondd: make all internal functions static

This commit is contained in:
Matthias Schiffer 2019-04-21 18:37:14 +02:00
parent 593b2c6266
commit 0f57108e3d
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
1 changed files with 6 additions and 6 deletions

View File

@ -210,7 +210,7 @@ static const struct respondd_provider_info * get_providers(const char *filename)
return ret; return ret;
} }
bool schedule_push_request(struct request_schedule *s, struct request_task *new_task) { static bool schedule_push_request(struct request_schedule *s, struct request_task *new_task) {
if (s->length >= SCHEDULE_LEN) if (s->length >= SCHEDULE_LEN)
// schedule is full // schedule is full
return false; return false;
@ -229,7 +229,7 @@ bool schedule_push_request(struct request_schedule *s, struct request_task *new_
return true; return true;
} }
int64_t schedule_idle_time(struct request_schedule *s) { static int64_t schedule_idle_time(struct request_schedule *s) {
if (!s->list_head) if (!s->list_head)
// nothing to do yet (0 = infinite time) // nothing to do yet (0 = infinite time)
return 0; return 0;
@ -242,7 +242,7 @@ int64_t schedule_idle_time(struct request_schedule *s) {
return result; return result;
} }
struct request_task * schedule_pop_request(struct request_schedule *s) { static struct request_task * schedule_pop_request(struct request_schedule *s) {
if (!s->list_head) if (!s->list_head)
// schedule is empty // schedule is empty
return NULL; return NULL;
@ -449,8 +449,8 @@ static struct json_object * handle_request(char *request, bool *compress) {
* @compress: True, if the answer should be compressed before sending * @compress: True, if the answer should be compressed before sending
* @addr: Ipv6 destination address for the answer * @addr: Ipv6 destination address for the answer
*/ */
void send_response(int sock, struct json_object *result, bool compress, static void send_response(int sock, struct json_object *result, bool compress,
struct sockaddr_in6 *addr) { struct sockaddr_in6 *addr) {
const char *output = NULL; const char *output = NULL;
size_t output_bytes; size_t output_bytes;
@ -488,7 +488,7 @@ void send_response(int sock, struct json_object *result, bool compress,
* @task: The task object (including the request query and the response address) * @task: The task object (including the request query and the response address)
* for the task. * for the task.
*/ */
void serve_request(struct request_task *task, int sock) { static void serve_request(struct request_task *task, int sock) {
bool compress; bool compress;
struct json_object *result = handle_request(task->request, &compress); struct json_object *result = handle_request(task->request, &compress);