Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21c13e56 authored by Ian Coolidge's avatar Ian Coolidge Committed by Pavlin Radoslavov
Browse files

Clean up A2D_ParsSbcInfo indentation

This should introduce no change in behavior.

Change-Id: I14faa73d898f69bd15aff7c3857c671ebe1628c9
parent 39a8223b
Loading
Loading
Loading
Loading
+40 −44
Original line number Diff line number Diff line
@@ -278,21 +278,19 @@ tA2D_STATUS A2D_BldSbcInfo(UINT8 media_type, tA2D_SBC_CIE *p_ie, UINT8 *p_result
tA2D_STATUS A2D_ParsSbcInfo(tA2D_SBC_CIE *p_ie, const UINT8 *p_info,
                            BOOLEAN for_caps)
{
    tA2D_STATUS status;
    tA2D_STATUS status = A2D_SUCCESS;
    UINT8 losc;

    if (p_ie == NULL || p_info == NULL)
        status = A2D_INVALID_PARAMS;
    else
    {
        return A2D_INVALID_PARAMS;

    losc = *p_info;
    p_info += 2;

    /* If the function is called for the wrong Media Type or Media Codec Type */
    if (losc != A2D_SBC_INFO_LEN || *p_info != A2D_MEDIA_CT_SBC)
            status = A2D_WRONG_CODEC;
        else
        {
        return A2D_WRONG_CODEC;

    p_info++;
    p_ie->samp_freq = *p_info & A2D_SBC_IE_SAMP_FREQ_MSK;
    p_ie->ch_mode   = *p_info & A2D_SBC_IE_CH_MD_MSK;
@@ -303,7 +301,6 @@ tA2D_STATUS A2D_ParsSbcInfo(tA2D_SBC_CIE *p_ie, const UINT8 *p_info,
    p_info++;
    p_ie->min_bitpool = *p_info++;
    p_ie->max_bitpool = *p_info;
            status = A2D_SUCCESS;
    if (p_ie->min_bitpool < A2D_SBC_IE_MIN_BITPOOL || p_ie->min_bitpool > A2D_SBC_IE_MAX_BITPOOL )
        status = A2D_BAD_MIN_BITPOOL;

@@ -311,8 +308,9 @@ tA2D_STATUS A2D_ParsSbcInfo(tA2D_SBC_CIE *p_ie, const UINT8 *p_info,
         p_ie->max_bitpool < p_ie->min_bitpool)
        status = A2D_BAD_MAX_BITPOOL;

            if(for_caps == FALSE)
            {
    if (for_caps != FALSE)
        return status;

    if (A2D_BitsSet(p_ie->samp_freq) != A2D_SET_ONE_BIT)
        status = A2D_BAD_SAMP_FREQ;
    if (A2D_BitsSet(p_ie->ch_mode) != A2D_SET_ONE_BIT)
@@ -323,9 +321,7 @@ tA2D_STATUS A2D_ParsSbcInfo(tA2D_SBC_CIE *p_ie, const UINT8 *p_info,
        status = A2D_BAD_SUBBANDS;
    if (A2D_BitsSet(p_ie->alloc_mthd) != A2D_SET_ONE_BIT)
        status = A2D_BAD_ALLOC_MTHD;
            }
        }
    }

    return status;
}