1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[gemini] cast

This commit is contained in:
Witold Filipczyk 2022-01-25 19:26:57 +01:00
parent 0d7aadf67c
commit 582d002e21
2 changed files with 8 additions and 8 deletions

View File

@ -62,7 +62,7 @@ static const char *
gemini_code_to_string(int code)
{
const struct gemini_code *element
= bsearch((void *) (long) code, gemini_code,
= (const struct gemini_code *)bsearch((void *) (long) code, gemini_code,
sizeof_array(gemini_code),
sizeof(*element),
compare_gemini_codes);
@ -129,7 +129,7 @@ struct gemini_error_info {
static void
show_gemini_error_document(struct session *ses, void *data)
{
struct gemini_error_info *info = data;
struct gemini_error_info *info = (struct gemini_error_info *)data;
struct terminal *term = ses->tab->term;
struct cache_entry *cached = find_in_cache(info->uri);
struct cache_entry *cache = cached ? cached : get_cache_entry(info->uri);

View File

@ -82,7 +82,7 @@ gemini_protocol_handler(struct connection *conn)
static void
done_gemini_connection(struct connection *conn)
{
struct gemini_connection_info *gemini = conn->info;
struct gemini_connection_info *gemini = (struct gemini_connection_info *)conn->info;
mem_free(gemini);
conn->info = NULL;
@ -109,7 +109,7 @@ init_gemini_connection_info(struct connection *conn)
static void
gemini_send_header(struct socket *socket)
{
struct connection *conn = socket->conn;
struct connection *conn = (struct connection *)socket->conn;
struct gemini_connection_info *gemini;
struct string header;
struct uri *uri = conn->uri;
@ -159,7 +159,7 @@ read_more_gemini_data(struct connection *conn, struct read_buffer *rb,
static void
read_gemini_data_done(struct connection *conn)
{
struct gemini_connection_info *gemini = conn->info;
struct gemini_connection_info *gemini = (struct gemini_connection_info *)conn->info;
/* There's no content but an error so just print
* that instead of nothing. */
@ -203,7 +203,7 @@ read_normal_gemini_data(struct connection *conn, struct read_buffer *rb)
static void
read_gemini_data(struct socket *socket, struct read_buffer *rb)
{
struct connection *conn = socket->conn;
struct connection *conn = (struct connection *)socket->conn;
int ret;
if (socket->state == SOCKET_CLOSED) {
@ -264,8 +264,8 @@ get_gemini_code(struct read_buffer *rb, int *code)
static void
gemini_got_header(struct socket *socket, struct read_buffer *rb)
{
struct connection *conn = socket->conn;
struct gemini_connection_info *gemini = conn->info;
struct connection *conn = (struct connection *)socket->conn;
struct gemini_connection_info *gemini = (struct gemini_connection_info *)conn->info;
struct string head_string;
struct connection_state state = (!is_in_state(conn->state, S_PROC)
? connection_state(S_GETH)