Skip to content

Commit

Permalink
Use ternary operator (#4)
Browse files Browse the repository at this point in the history
* Use ternary operator
  • Loading branch information
adnan-mujagic authored Oct 31, 2024
1 parent 60f0a89 commit e5bf910
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/plugins/janus_sip.c
Original file line number Diff line number Diff line change
Expand Up @@ -3968,15 +3968,10 @@ static void *janus_sip_handler(void *data) {
goto error;
}
janus_mutex_unlock(&session->mutex);
if(progress) {
JANUS_VALIDATE_JSON_OBJECT(root, progress_parameters,
error_code, error_cause, TRUE,
JANUS_SIP_ERROR_MISSING_ELEMENT, JANUS_SIP_ERROR_INVALID_ELEMENT);
} else {
JANUS_VALIDATE_JSON_OBJECT(root, accept_parameters,
error_code, error_cause, TRUE,
JANUS_SIP_ERROR_MISSING_ELEMENT, JANUS_SIP_ERROR_INVALID_ELEMENT);
}
struct janus_json_parameter *params = progress ? progress_parameters : accept_parameters;
JANUS_VALIDATE_JSON_OBJECT(root, params,
error_code, error_cause, TRUE,
JANUS_SIP_ERROR_MISSING_ELEMENT, JANUS_SIP_ERROR_INVALID_ELEMENT);
if(error_code != 0)
goto error;
json_t *srtp = json_object_get(root, "srtp");
Expand Down

0 comments on commit e5bf910

Please sign in to comment.