mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-20 06:59:58 -05:00
cleaup up the result codes
This commit is contained in:
parent
caaeaff223
commit
dda28b1589
10 changed files with 63 additions and 68 deletions
|
|
@ -206,7 +206,7 @@ static inline int spa_pod_parser_getv(struct spa_pod_parser *parser,
|
|||
switch (*format) {
|
||||
case '<':
|
||||
if (pod == NULL || SPA_POD_TYPE(pod) != SPA_POD_TYPE_OBJECT)
|
||||
return SPA_RESULT_ERROR;
|
||||
return SPA_RESULT_INCOMPATIBLE;
|
||||
if (++parser->depth >= SPA_POD_MAX_DEPTH)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
||||
|
|
@ -215,7 +215,7 @@ static inline int spa_pod_parser_getv(struct spa_pod_parser *parser,
|
|||
goto read_pod;
|
||||
case '[':
|
||||
if (pod == NULL || SPA_POD_TYPE(pod) != SPA_POD_TYPE_STRUCT)
|
||||
return SPA_RESULT_ERROR;
|
||||
return SPA_RESULT_INCOMPATIBLE;
|
||||
if (++parser->depth >= SPA_POD_MAX_DEPTH)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ static inline int spa_pod_parser_getv(struct spa_pod_parser *parser,
|
|||
goto read_pod;
|
||||
case ']': case '>':
|
||||
if (current != NULL)
|
||||
return SPA_RESULT_ERROR;
|
||||
return SPA_RESULT_INCOMPATIBLE;
|
||||
if (--parser->depth < 0)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue