From d1e2ad9a9e278473d0583ba733928f9924d0ce04 Mon Sep 17 00:00:00 2001 From: verdant Date: Tue, 9 Jun 2026 18:26:08 +0800 Subject: Make file-local functions as static No functional changes introduced. --- server.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server.c b/server.c index fdc8724..0197aab 100644 --- a/server.c +++ b/server.c @@ -19,7 +19,7 @@ static void usage(const char *progname) exit(EXIT_FAILURE); } -int shsd_sendfile(int in_fd, FILE *ou_fd) +static int shsd_sendfile(int in_fd, FILE *ou_fd) { struct stat s; int stat_result = fstat(fileno(ou_fd), &s); @@ -32,7 +32,7 @@ int shsd_sendfile(int in_fd, FILE *ou_fd) return 0; } -HTTP_METHODS get_require_method(char *method) +static HTTP_METHODS get_require_method(char *method) { HTTP_METHODS m; if (strcmp(method, "GET") == 0) { @@ -48,7 +48,7 @@ HTTP_METHODS get_require_method(char *method) } } -int check_file_stat(const char *path, int fd) +sitatic int check_file_stat(const char *path, int fd) { struct stat st; if (stat(path, &st) == -1 && S_ISDIR(st.st_mode)) { @@ -58,7 +58,7 @@ int check_file_stat(const char *path, int fd) return 0; } -int handle_client(int client_fd, char *buf) +sitatic int handle_client(int client_fd, char *buf) { char method[16], path[256]; if (sscanf(buf, "%15s %255s", method, path) < 2) { -- cgit v1.2.3