aboutsummaryrefslogtreecommitdiff
path: root/src/IO
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2024-07-28 16:35:51 +0200
committerRodrigo Arias Mallo <rodarima@gmail.com>2024-08-07 16:50:43 +0200
commit4d51150ca0aae979718ac10030df85421b763cd1 (patch)
treea824a83feefca6695fbe1072b3d724290b07af1f /src/IO
parenta9950b3aca2a264e0ee1da1e2a29d3be11e6606c (diff)
Make Dillo C99 standard compliant
Reviewed-by: dogma
Diffstat (limited to 'src/IO')
-rw-r--r--src/IO/dpi.c10
-rw-r--r--src/IO/http.c6
-rw-r--r--src/IO/mime.c2
-rw-r--r--src/IO/tls.c2
-rw-r--r--src/IO/tls.h4
-rw-r--r--src/IO/tls_mbedtls.h4
-rw-r--r--src/IO/tls_openssl.c6
-rw-r--r--src/IO/tls_openssl.h4
8 files changed, 19 insertions, 19 deletions
diff --git a/src/IO/dpi.c b/src/IO/dpi.c
index d7dd7d0b..c1786de6 100644
--- a/src/IO/dpi.c
+++ b/src/IO/dpi.c
@@ -419,7 +419,7 @@ static int Dpi_read_comm_keys(int *port)
/**
* Return a socket file descriptor
*/
-static int Dpi_make_socket_fd()
+static int Dpi_make_socket_fd(void)
{
int fd, one = 1, ret = -1;
@@ -435,7 +435,7 @@ static int Dpi_make_socket_fd()
* Make a connection test for a IDS.
* Return: 1 OK, -1 Not working.
*/
-static int Dpi_check_dpid_ids()
+static int Dpi_check_dpid_ids(void)
{
struct sockaddr_in sin;
const socklen_t sin_sz = sizeof(sin);
@@ -504,12 +504,12 @@ static int Dpi_check_dpid(int num_tries)
static int Dpi_blocking_start_dpid(void)
{
int cst, try = 0,
- n_tries = 12; /* 3 seconds */
+ n_tries = 3; /* 3 seconds */
/* test the dpid, and wait a bit for it to start if necessary */
while ((cst = Dpi_check_dpid(n_tries)) == 1) {
MSG("Dpi_blocking_start_dpid: try %d\n", ++try);
- usleep(250000); /* 1/4 sec */
+ sleep(1);
}
return cst;
}
@@ -757,7 +757,7 @@ void a_Dpi_ccc(int Op, int Branch, int Dir, ChainLink *Info,
* Note: currently disabled. It may serve to let the cookies dpi know
* when to expire session cookies.
*/
-void a_Dpi_dillo_exit()
+void a_Dpi_dillo_exit(void)
{
}
diff --git a/src/IO/http.c b/src/IO/http.c
index 4c4618c5..c7915fc5 100644
--- a/src/IO/http.c
+++ b/src/IO/http.c
@@ -234,7 +234,7 @@ void a_Http_connect_done(int fd, bool_t success)
dFree(info);
}
} else {
- MSG("**** but no luck with fme %p or sd\n", fme);
+ MSG("**** but no luck with fme %p or sd\n", (void *) fme);
}
}
@@ -1091,7 +1091,7 @@ static void Http_server_remove(Server_t *srv)
dFree(srv);
}
-static void Http_servers_remove_all()
+static void Http_servers_remove_all(void)
{
Server_t *srv;
SocketData_t *sd;
@@ -1107,7 +1107,7 @@ static void Http_servers_remove_all()
dList_free(servers);
}
-static void Http_fd_map_remove_all()
+static void Http_fd_map_remove_all(void)
{
FdMapEntry_t *fme;
int i, n = dList_length(fd_map);
diff --git a/src/IO/mime.c b/src/IO/mime.c
index bc70a85f..1f6a3d47 100644
--- a/src/IO/mime.c
+++ b/src/IO/mime.c
@@ -94,7 +94,7 @@ static Viewer_t Mime_major_type_fetch(const char *Key, uint_t Size)
/**
* Initializes Mime module and, sets the supported Mime types.
*/
-void a_Mime_init()
+void a_Mime_init(void)
{
#ifdef ENABLE_GIF
Mime_add_minor_type("image/gif", a_Dicache_gif_image);
diff --git a/src/IO/tls.c b/src/IO/tls.c
index 05ae2514..4c0cfe7e 100644
--- a/src/IO/tls.c
+++ b/src/IO/tls.c
@@ -28,7 +28,7 @@
/**
* Initialize TLS library.
*/
-void a_Tls_init()
+void a_Tls_init(void)
{
#if ! defined(ENABLE_TLS)
MSG("TLS: Disabled at compilation time.\n");
diff --git a/src/IO/tls.h b/src/IO/tls.h
index 25da6ea6..500b2421 100644
--- a/src/IO/tls.h
+++ b/src/IO/tls.h
@@ -31,13 +31,13 @@ extern "C" {
#define TLS_CONNECT_NOT_YET 0
#define TLS_CONNECT_READY 1
-void a_Tls_init();
+void a_Tls_init(void);
int a_Tls_certificate_is_clean(const DilloUrl *url);
int a_Tls_connect_ready(const DilloUrl *url);
void a_Tls_reset_server_state(const DilloUrl *url);
void a_Tls_connect(int fd, const DilloUrl *url);
void *a_Tls_connection(int fd);
-void a_Tls_freeall();
+void a_Tls_freeall(void);
void a_Tls_close_by_fd(int fd);
int a_Tls_read(void *conn, void *buf, size_t len);
int a_Tls_write(void *conn, void *buf, size_t len);
diff --git a/src/IO/tls_mbedtls.h b/src/IO/tls_mbedtls.h
index 4a679698..8ce16318 100644
--- a/src/IO/tls_mbedtls.h
+++ b/src/IO/tls_mbedtls.h
@@ -21,13 +21,13 @@ extern "C" {
#include "../url.h"
-void a_Tls_mbedtls_init();
+void a_Tls_mbedtls_init(void);
int a_Tls_mbedtls_certificate_is_clean(const DilloUrl *url);
int a_Tls_mbedtls_connect_ready(const DilloUrl *url);
void a_Tls_mbedtls_reset_server_state(const DilloUrl *url);
void a_Tls_mbedtls_connect(int fd, const DilloUrl *url);
void *a_Tls_mbedtls_connection(int fd);
-void a_Tls_mbedtls_freeall();
+void a_Tls_mbedtls_freeall(void);
void a_Tls_mbedtls_close_by_fd(int fd);
int a_Tls_mbedtls_read(void *conn, void *buf, size_t len);
int a_Tls_mbedtls_write(void *conn, void *buf, size_t len);
diff --git a/src/IO/tls_openssl.c b/src/IO/tls_openssl.c
index 10a68dbd..3e68e928 100644
--- a/src/IO/tls_openssl.c
+++ b/src/IO/tls_openssl.c
@@ -199,7 +199,7 @@ static void Tls_info_cb(const SSL *ssl, int where, int ret)
* abysmal openssl documentation, this was worked out from reading discussion
* on the web and then reading openssl source to see what it normally does.
*/
-static void Tls_load_certificates()
+static void Tls_load_certificates(void)
{
/* curl-7.37.1 says that the following bundle locations are used on "Debian
* systems", "Redhat and Mandriva", "old(er) Redhat", "FreeBSD", and
@@ -1338,7 +1338,7 @@ void a_Tls_openssl_close_by_fd(int fd)
}
}
-static void Tls_servers_freeall()
+static void Tls_servers_freeall(void)
{
if (servers) {
Server_t *s;
@@ -1353,7 +1353,7 @@ static void Tls_servers_freeall()
}
}
-static void Tls_fd_map_remove_all()
+static void Tls_fd_map_remove_all(void)
{
if (fd_map) {
FdMapEntry_t *fme;
diff --git a/src/IO/tls_openssl.h b/src/IO/tls_openssl.h
index 5cfd5dfd..edde93ef 100644
--- a/src/IO/tls_openssl.h
+++ b/src/IO/tls_openssl.h
@@ -31,13 +31,13 @@ extern "C" {
#include "../url.h"
-void a_Tls_openssl_init();
+void a_Tls_openssl_init(void);
int a_Tls_openssl_certificate_is_clean(const DilloUrl *url);
int a_Tls_openssl_connect_ready(const DilloUrl *url);
void a_Tls_openssl_reset_server_state(const DilloUrl *url);
void a_Tls_openssl_connect(int fd, const DilloUrl *url);
void *a_Tls_openssl_connection(int fd);
-void a_Tls_openssl_freeall();
+void a_Tls_openssl_freeall(void);
void a_Tls_openssl_close_by_fd(int fd);
int a_Tls_openssl_read(void *conn, void *buf, size_t len);
int a_Tls_openssl_write(void *conn, void *buf, size_t len);