diff --git a/src/cookies/cookies.c b/src/cookies/cookies.c index 7300083e..30269df7 100644 --- a/src/cookies/cookies.c +++ b/src/cookies/cookies.c @@ -836,7 +836,7 @@ save_cookies(struct terminal *term) { time_t now; #ifdef CONFIG_SMALL -# define CANNOT_SAVE_COOKIES(flags, message) +# define CANNOT_SAVE_COOKIES(flags, message) #else # define CANNOT_SAVE_COOKIES(flags, message) \ do { \ @@ -895,7 +895,7 @@ save_cookies(struct terminal *term) { CANNOT_SAVE_COOKIES(MSGBOX_NO_TEXT_INTL, secsave_strerror(secsave_errno, term)); } -#undef CANNOT_SAVE_COOKIES +#undef CANNOT_SAVE_COOKIES } static void diff --git a/src/document/html/parser/general.c b/src/document/html/parser/general.c index 33fe08c0..2998a312 100644 --- a/src/document/html/parser/general.c +++ b/src/document/html/parser/general.c @@ -123,7 +123,7 @@ html_quote_close(struct html_context *html_context, unsigned char *a, unsigned char **xxx5) { unsigned char *q; - + if (html_context->quote_level > 0) html_context->quote_level--; diff --git a/src/document/html/parser/parse.c b/src/document/html/parser/parse.c index 135f6459..34e6ad9f 100644 --- a/src/document/html/parser/parse.c +++ b/src/document/html/parser/parse.c @@ -615,7 +615,7 @@ count_newline_entities(const unsigned char *html, const unsigned char *eof, if (peek == eof || *peek != ';') break; ++peek; - + if (this_is_cr || !prev_was_cr) ++newlines; prev_was_cr = this_is_cr; diff --git a/src/document/html/renderer.c b/src/document/html/renderer.c index dfd7f625..15f51092 100644 --- a/src/document/html/renderer.c +++ b/src/document/html/renderer.c @@ -161,7 +161,7 @@ realloc_line(struct html_context *html_context, struct document *document, line = &document->data[y]; orig_length = line->length; - + if (length < orig_length) return orig_length; diff --git a/src/ecmascript/ecmascript.h b/src/ecmascript/ecmascript.h index 47063bb9..0238706a 100644 --- a/src/ecmascript/ecmascript.h +++ b/src/ecmascript/ecmascript.h @@ -23,7 +23,7 @@ struct ecmascript_interpreter { /* The code evaluated by setTimeout() */ struct string code; - + time_t exec_start; /* This is a cross-rerenderings accumulator of diff --git a/src/ecmascript/see/window.h b/src/ecmascript/see/window.h index 76bd1adc..0511c53b 100644 --- a/src/ecmascript/see/window.h +++ b/src/ecmascript/see/window.h @@ -19,7 +19,7 @@ struct js_window_object { struct global_object { struct SEE_interpreter interp; /* used by setTimeout */ - struct ecmascript_interpreter *interpreter; + struct ecmascript_interpreter *interpreter; struct js_window_object *win; struct string *ret; int exec_start; diff --git a/src/encoding/bzip2.c b/src/encoding/bzip2.c index 9df4c658..87434b15 100644 --- a/src/encoding/bzip2.c +++ b/src/encoding/bzip2.c @@ -66,7 +66,7 @@ bzip2_open(struct stream_encoded *stream, int fd) copy_struct(&data->fbz_stream, &null_bz_stream); data->fdread = fd; data->last_read = 0; - + err = BZ2_bzDecompressInit(&data->fbz_stream, 0, 0); if (err != BZ_OK) { mem_free(data); @@ -86,14 +86,14 @@ bzip2_read(struct stream_encoded *stream, unsigned char *buf, int len) if (!data) return -1; - assert(len > 0); + assert(len > 0); if (data->last_read) return 0; data->fbz_stream.avail_out = len; data->fbz_stream.next_out = buf; - do { + do { if (data->fbz_stream.avail_in == 0) { int l = safe_read(data->fdread, data->buf, ELINKS_BZ_BUFFER_LENGTH); @@ -111,12 +111,12 @@ bzip2_read(struct stream_encoded *stream, unsigned char *buf, int len) data->fbz_stream.next_in = data->buf; data->fbz_stream.avail_in = l; } - + err = BZ2_bzDecompress(&data->fbz_stream); - if (err == BZ_STREAM_END) { + if (err == BZ_STREAM_END) { data->last_read = 1; break; - } else if (err != BZ_OK) { + } else if (err != BZ_OK) { return -1; } } while (data->fbz_stream.avail_out > 0); diff --git a/src/protocol/fsp/fsp.c b/src/protocol/fsp/fsp.c index 04bd3df1..06b24efc 100644 --- a/src/protocol/fsp/fsp.c +++ b/src/protocol/fsp/fsp.c @@ -147,7 +147,7 @@ display_entry(const FSP_RDENTRY *fentry, const unsigned char dircolor[]) add_to_string(&string, "\tname, namelen, 0); + encode_uri_string(&string, fentry->name, namelen, 0); if (fentry->type == FSP_RDTYPE_DIR) { add_to_string(&string, "/\">"); if (*dircolor) { diff --git a/src/protocol/ftp/ftp.c b/src/protocol/ftp/ftp.c index 11587ee3..13201275 100644 --- a/src/protocol/ftp/ftp.c +++ b/src/protocol/ftp/ftp.c @@ -725,7 +725,7 @@ add_file_cmd_to_str(struct connection *conn) || !add_crlf_to_string(&command) || !add_string_to_string(&command, &ftp_data_command) - + || !add_to_string(&command, "CWD ") || !add_string_to_string(&command, &pathname) || !add_crlf_to_string(&command) diff --git a/src/protocol/http/http.c b/src/protocol/http/http.c index 62f7c3f7..670845c8 100644 --- a/src/protocol/http/http.c +++ b/src/protocol/http/http.c @@ -702,7 +702,7 @@ http_send_header(struct socket *socket) } /* CONNECT: Referer probably is a secret page in the HTTPS - * server, so don't reveal it to the proxy. */ + * server, so don't reveal it to the proxy. */ if (!use_connect) { switch (get_opt_int("protocol.http.referer.policy")) { case REFERER_NONE: @@ -1042,7 +1042,7 @@ decompress_data(struct connection *conn, unsigned char *data, int len, if (state == NORMAL) { /* ... we aren't finishing yet. */ int written; - + written = safe_write(conn->stream_pipes[1], data, len > to_read ? to_read : len); @@ -1071,7 +1071,7 @@ decompress_data(struct connection *conn, unsigned char *data, int len, } } } - + if (!conn->stream) { conn->stream = open_encoded(conn->stream_pipes[0], conn->content_encoding); diff --git a/src/protocol/user.c b/src/protocol/user.c index 3a92ead7..76b466a7 100644 --- a/src/protocol/user.c +++ b/src/protocol/user.c @@ -253,7 +253,7 @@ error: fclose(fp); goto error; } - + if (fclose(fp) != 0) goto error; diff --git a/src/util/memlist.c b/src/util/memlist.c index f3397532..934ff433 100644 --- a/src/util/memlist.c +++ b/src/util/memlist.c @@ -93,7 +93,7 @@ add_to_ml(struct memory_list **ml, ...) errline = line, errfile = file; #else errline = 0, errfile = "?"; -#endif +#endif elinks_error("add_to_ml(%p, NULL, ...)", ml); #endif return; diff --git a/src/util/secsave.c b/src/util/secsave.c index fae599f2..ec2b1bcc 100644 --- a/src/util/secsave.c +++ b/src/util/secsave.c @@ -211,7 +211,7 @@ secure_open(unsigned char *file_name) #else const mode_t mask = S_IXUSR | S_IRWXG | S_IRWXO; #endif - + saved_mask = umask(mask); ssi = secure_open_umask(file_name); umask(saved_mask);