mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
new buffer representation changes; use FATAL_ERROR not INSIST(0)
This commit is contained in:
parent
005df5aba5
commit
72c5d65bd2
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 1998 Internet Software Consortium.
|
* Copyright (C) 1998, 1999 Internet Software Consortium.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <isc/assertions.h>
|
#include <isc/assertions.h>
|
||||||
#include <isc/boolean.h>
|
#include <isc/boolean.h>
|
||||||
|
#include <isc/error.h>
|
||||||
#include <isc/lex.h>
|
#include <isc/lex.h>
|
||||||
#include <isc/list.h>
|
#include <isc/list.h>
|
||||||
|
|
||||||
@ -327,11 +328,13 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
|
|||||||
} else {
|
} else {
|
||||||
buffer = source->input;
|
buffer = source->input;
|
||||||
|
|
||||||
if (buffer->current == buffer->base + buffer->used) {
|
if (buffer->current == buffer->used) {
|
||||||
c = EOF;
|
c = EOF;
|
||||||
source->result = ISC_R_EOF;
|
source->result = ISC_R_EOF;
|
||||||
} else
|
} else {
|
||||||
c = *buffer->current++;
|
c = *((char *)buffer->base + buffer->current);
|
||||||
|
buffer->current++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lex->comment_ok && !no_comments) {
|
if (lex->comment_ok && !no_comments) {
|
||||||
@ -544,7 +547,9 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
INSIST(0);
|
FATAL_ERROR(__FILE__, __LINE__,
|
||||||
|
"Unexpected state %d", state);
|
||||||
|
/* Does not return. */
|
||||||
}
|
}
|
||||||
|
|
||||||
} while (!done);
|
} while (!done);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user