2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Check return values or cast them to (void), as required by the coding

standards; add exceptions to the coding standards for cases where this is
not desirable
This commit is contained in:
Andreas Gustafsson
2001-11-30 01:59:49 +00:00
parent 9ac8796f16
commit 1f1d36a87b
61 changed files with 420 additions and 409 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lex.c,v 1.70 2001/11/30 01:02:13 gson Exp $ */
/* $Id: lex.c,v 1.71 2001/11/30 01:59:33 gson Exp $ */
#include <config.h>
@@ -132,7 +132,7 @@ isc_lex_destroy(isc_lex_t **lexp) {
REQUIRE(VALID_LEX(lex));
while (!EMPTY(lex->sources))
isc_lex_close(lex);
RUNTIME_CHECK(isc_lex_close(lex) == ISC_R_SUCCESS);
if (lex->data != NULL)
isc_mem_put(lex->mctx, lex->data, lex->max_token + 1);
lex->magic = 0;
@@ -238,7 +238,7 @@ isc_lex_openfile(isc_lex_t *lex, const char *filename) {
result = new_source(lex, ISC_TRUE, ISC_TRUE, stream, filename);
if (result != ISC_R_SUCCESS)
fclose(stream);
(void)fclose(stream);
return (result);
}
@@ -291,7 +291,7 @@ isc_lex_close(isc_lex_t *lex) {
ISC_LIST_UNLINK(lex->sources, source, link);
if (source->is_file) {
if (source->need_close)
fclose((FILE *)(source->input));
(void)fclose((FILE *)(source->input));
}
isc_mem_free(lex->mctx, source->name);
isc_buffer_free(&source->pushback);