mirror of
https://github.com/libretro/RetroArch
synced 2025-04-15 23:42:30 +00:00
(libretrodb) Small cleanup
This commit is contained in:
parent
caa01d5fee
commit
8ced8b00e4
@ -13,9 +13,8 @@
|
||||
#include "rmsgpack_dom.h"
|
||||
#include <compat/fnmatch.h>
|
||||
|
||||
#define MAX_ERROR_LEN 256
|
||||
#undef MAX_ARGS
|
||||
#define MAX_ARGS 50
|
||||
#define MAX_ERROR_LEN 256
|
||||
#define QUERY_MAX_ARGS 50
|
||||
|
||||
static char tmp_error_buff [MAX_ERROR_LEN] = {0};
|
||||
|
||||
@ -613,7 +612,7 @@ static struct buffer parse_method_call(struct buffer buff,
|
||||
const char *func_name;
|
||||
size_t func_name_len;
|
||||
unsigned i;
|
||||
struct argument args[MAX_ARGS];
|
||||
struct argument args[QUERY_MAX_ARGS];
|
||||
unsigned argi = 0;
|
||||
struct registered_func *rf = registered_functions;
|
||||
|
||||
@ -648,7 +647,7 @@ static struct buffer parse_method_call(struct buffer buff,
|
||||
buff = chomp(buff);
|
||||
while (!peek(buff, ")"))
|
||||
{
|
||||
if (argi >= MAX_ARGS)
|
||||
if (argi >= QUERY_MAX_ARGS)
|
||||
{
|
||||
raise_too_many_arguments(error);
|
||||
goto error;
|
||||
@ -698,13 +697,13 @@ error:
|
||||
static struct buffer parse_table(struct buffer buff,
|
||||
struct invocation *invocation, const char **error)
|
||||
{
|
||||
struct argument args[MAX_ARGS];
|
||||
struct argument args[QUERY_MAX_ARGS];
|
||||
unsigned i;
|
||||
const char *ident_name;
|
||||
size_t ident_len;
|
||||
unsigned argi = 0;
|
||||
|
||||
memset(args, 0, sizeof(struct argument) * MAX_ARGS);
|
||||
memset(args, 0, sizeof(struct argument) * QUERY_MAX_ARGS);
|
||||
|
||||
buff = chomp(buff);
|
||||
buff = expect_char(buff, '{', error);
|
||||
@ -716,7 +715,7 @@ static struct buffer parse_table(struct buffer buff,
|
||||
|
||||
while (!peek(buff, "}"))
|
||||
{
|
||||
if (argi >= MAX_ARGS)
|
||||
if (argi >= QUERY_MAX_ARGS)
|
||||
{
|
||||
raise_too_many_arguments(error);
|
||||
goto error;
|
||||
@ -761,7 +760,7 @@ static struct buffer parse_table(struct buffer buff,
|
||||
|
||||
buff = chomp(buff);
|
||||
|
||||
if (argi >= MAX_ARGS)
|
||||
if (argi >= QUERY_MAX_ARGS)
|
||||
{
|
||||
raise_too_many_arguments(error);
|
||||
goto error;
|
||||
|
Loading…
x
Reference in New Issue
Block a user