Skip to content

Commit 9043ded

Browse files
committed
[utils] reorders the parameters of parsing string function
1 parent 8faf42a commit 9043ded

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ static int _utils_searchexp(const char *haystack, const char *needleslist, int i
317317
return ret;
318318
}
319319

320-
static int utils_searchstring(const char **result, const char *haystack, const char *needle, int *length)
320+
static int utils_searchstring(const char *haystack, const char *needle, const char **result, int *length)
321321
{
322322
if (*length != 0)
323323
return 0;
@@ -379,7 +379,7 @@ int utils_parsestring(const char *string, int listlength, utils_parsestring_t li
379379
{
380380
const char *value = NULL;
381381
int valuelen = 0;
382-
int ret = utils_searchstring(&value, string + i, list[listit].field, &valuelen);
382+
int ret = utils_searchstring(string + i, list[listit].field, &value, &valuelen);
383383
i += ret;
384384
if (ret > 0)
385385
{

0 commit comments

Comments
 (0)