Skip to content

Commit

Permalink
Check 'supported' array and number of types are the same
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Mar 26, 2014
1 parent 23a3b8c commit e81da54
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/rlm_rest/rest.c
Expand Up @@ -231,6 +231,9 @@ int rest_init(rlm_rest_t *instance)
{
CURLcode ret;

/* developer sanity */
rad_assert((sizeof(http_body_type_supported) / sizeof(*http_body_type_supported)) == HTTP_BODY_NUM_ENTRIES);

ret = curl_global_init(CURL_GLOBAL_ALL);
if (ret != CURLE_OK) {
ERROR("rlm_rest (%s): CURL init returned error: %i - %s",
Expand Down

0 comments on commit e81da54

Please sign in to comment.