Merge pull request #33 from bakulf/master

Little fixes
This commit is contained in:
Petri Lehtinen 2011-09-20 11:11:55 -07:00
commit 2a70d62251
2 changed files with 1 additions and 2 deletions

View File

@ -62,7 +62,6 @@ static size_t primes[] = {
12582917, 25165843, 50331653, 100663319, 201326611, 402653189, 12582917, 25165843, 50331653, 100663319, 201326611, 402653189,
805306457, 1610612741 805306457, 1610612741
}; };
static const size_t num_primes = sizeof(primes) / sizeof(size_t);
static JSON_INLINE size_t num_buckets(hashtable_t *hashtable) static JSON_INLINE size_t num_buckets(hashtable_t *hashtable)
{ {

View File

@ -69,6 +69,7 @@ static void error_set(json_error_t *error, const lex_t *lex,
{ {
va_list ap; va_list ap;
char msg_text[JSON_ERROR_TEXT_LENGTH]; char msg_text[JSON_ERROR_TEXT_LENGTH];
char msg_with_context[JSON_ERROR_TEXT_LENGTH];
int line = -1, col = -1; int line = -1, col = -1;
size_t pos = 0; size_t pos = 0;
@ -84,7 +85,6 @@ static void error_set(json_error_t *error, const lex_t *lex,
if(lex) if(lex)
{ {
const char *saved_text = strbuffer_value(&lex->saved_text); const char *saved_text = strbuffer_value(&lex->saved_text);
char msg_with_context[JSON_ERROR_TEXT_LENGTH];
line = lex->stream.line; line = lex->stream.line;
col = lex->stream.column; col = lex->stream.column;