Project

General

Profile

Bug #2222

gsm/tlv.h: unreachable part of code

Added by fixeria about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
05/04/2017
Due date:
% Done:

100%

Spec Reference:

Description

Look at include/osmocom/gsm/tlv.h:63

/*! \brief gross length of vTvLV (tag+len+val) */
static inline uint16_t VTVLV_GAN_GROSS_LEN(uint16_t tag, uint16_t len)
{
    uint16_t ret;

    if (len <= TVLV_MAX_ONEBYTE)
        return TLV_GROSS_LEN(len);
    else
        return TL16V_GROSS_LEN(len);

    if (tag > TVLV_MAX_ONEBYTE)
        ret += 1;

    return ret;
}

Second condition is unreachable part of code.

History

#1 Updated by fixeria about 2 years ago

  • Description updated (diff)

#2 Updated by fixeria about 2 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#3 Updated by fixeria about 2 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)