diff options
-rw-r--r-- | tests/server/resolve.c | 2 | ||||
-rw-r--r-- | tests/server/sockfilt.c | 8 | ||||
-rw-r--r-- | tests/server/sws.c | 12 | ||||
-rw-r--r-- | tests/server/tftpd.c | 40 |
4 files changed, 32 insertions, 30 deletions
diff --git a/tests/server/resolve.c b/tests/server/resolve.c index 75b86432b..79cf58210 100644 --- a/tests/server/resolve.c +++ b/tests/server/resolve.c @@ -61,7 +61,7 @@ /* include memdebug.h last */ #include "memdebug.h" -char use_ipv6=FALSE; +static char use_ipv6=FALSE; const char *serverlogfile=""; /* for a util.c function we don't use */ diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index f78590f5e..74ae7d364 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -121,10 +121,10 @@ const char *serverlogfile = DEFAULT_LOGFILE; -bool verbose = FALSE; -bool use_ipv6 = FALSE; -unsigned short port = DEFAULT_PORT; -unsigned short connectport = 0; /* if non-zero, we activate this mode */ +static bool verbose = FALSE; +static bool use_ipv6 = FALSE; +static unsigned short port = DEFAULT_PORT; +static unsigned short connectport = 0; /* if non-zero, we activate this mode */ enum sockmode { PASSIVE_LISTEN, /* as a server waiting for connections */ diff --git a/tests/server/sws.c b/tests/server/sws.c index 92f485954..e60b8d79c 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -74,11 +74,11 @@ #define REQBUFSIZ 150000 #define REQBUFSIZ_TXT "149999" -long prevtestno=-1; /* previous test number we served */ -long prevpartno=-1; /* previous part number we served */ -bool prevbounce=FALSE; /* instructs the server to increase the part number for - a test in case the identical testno+partno request - shows up again */ +static long prevtestno=-1; /* previous test number we served */ +static long prevpartno=-1; /* previous part number we served */ +static bool prevbounce=FALSE; /* instructs the server to increase the part + number for a test in case the identical + testno+partno request shows up again */ #define RCMD_NORMALREQ 0 /* default request, use the tests file normally */ #define RCMD_IDLE 1 /* told to sit idle */ @@ -858,7 +858,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req) return 0; } -bool use_ipv6=FALSE; +static bool use_ipv6=FALSE; int main(int argc, char *argv[]) { diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c index 4cf27edba..221129e33 100644 --- a/tests/server/tftpd.c +++ b/tests/server/tftpd.c @@ -118,7 +118,16 @@ static void mysignal(int, void (*func)(int)); #define PKTSIZE SEGSIZE+4 -struct formats; +struct formats { + const char *f_mode; + int f_convert; +}; +static struct formats formata[] = { + { "netascii", 1 }, + { "octet", 0 }, + { NULL, 0 } +}; + static int tftp(struct testcase *test, struct tftphdr *tp, ssize_t size); static void nak(int error); static void sendtftp(struct testcase *test, struct formats *pf); @@ -137,7 +146,8 @@ static socklen_t fromlen; struct bf { int counter; /* size of data in buffer, or flag */ char buf[PKTSIZE]; /* room for data packet */ -} bfs[2]; +}; +static struct bf bfs[2]; /* Values for bf.counter */ #define BF_ALLOC -3 /* alloc'd but not yet filled */ @@ -147,9 +157,9 @@ struct bf { static int nextone; /* index of next buffer to use */ static int current; /* index of buffer in use */ - /* control flags for crlf conversions */ -int newline = 0; /* fillbuf: in middle of newline expansion */ -int prevchar = -1; /* putbuf: previous char (cr check) */ + /* control flags for crlf conversions */ +static int newline = 0; /* fillbuf: in middle of newline expansion */ +static int prevchar = -1; /* putbuf: previous char (cr check) */ static void read_ahead(struct testcase *test, int convert /* if true, convert to ascii */); @@ -397,7 +407,7 @@ const char *serverlogfile = DEFAULT_LOGFILE; #define REQUEST_DUMP "log/server.input" -char use_ipv6=FALSE; +static char use_ipv6=FALSE; int main(int argc, char **argv) { @@ -561,15 +571,6 @@ int main(int argc, char **argv) return result; } -struct formats { - const char *f_mode; - int f_convert; -} formats[] = { - { "netascii", 1 }, - { "octet", 0 }, - { NULL, 0 } -}; - /* * Handle initial connection protocol. */ @@ -623,7 +624,7 @@ again: fprintf(server, "mode: %s\n", mode); fclose(server); - for (pf = formats; pf->f_mode; pf++) + for (pf = formata; pf->f_mode; pf++) if (strcmp(pf->f_mode, mode) == 0) break; if (!pf->f_mode) { @@ -734,9 +735,9 @@ static int validate_access(struct testcase *test, return 0; } -int timeout; +static int timeout; #ifdef HAVE_SIGSETJMP -sigjmp_buf timeoutbuf; +static sigjmp_buf timeoutbuf; #endif static void timer(int signum) @@ -919,7 +920,8 @@ abort: struct errmsg { int e_code; const char *e_msg; -} errmsgs[] = { +}; +static struct errmsg errmsgs[] = { { EUNDEF, "Undefined error code" }, { ENOTFOUND, "File not found" }, { EACCESS, "Access violation" }, |