Skip to main content

Unused variable in mpe_siUpdateServiceEntry

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2010-06-17

Just thought we should mention that in the function mpe_siUpdateServiceEntry() there is a local variable:

    mpe_Bool dupFound = false;

That is never set true.

In older versions of the file this was used in conditional code eg:

            if (walker->ts_handle == MPE_SI_INVALID_HANDLE && !dupFound)

                if (!dupFound)
                    walker->program = (mpe_SiProgramInfo *) pi_handle;

And was set when:

                    if ((si_entry->state == SIENTRY_UNSPECIFIED)
                            && (si_entry->program == pgm)
                            && (si_entry->ts_handle == ts_handle))
                        dupFound = true;

After IT-276 and IT-546 were implemented the code that set this was removed, but the variable wasn't. This meant that when we ported IT-276 only to RI 1.1.4 we missed the subtle change in the second example to:

                if (!dupFound && ((mpe_SiProgramHandle)walker->program != pi_handle))
                    walker->program = (mpe_SiProgramInfo *) pi_handle;

Now dupFound is always false, so could be removed and we wouldn't have gotten into a bit of a fix when trying to update the VCM multiple times before deleting a service.

Just thought I should mention it.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2008-12-17

Apologies for the oversight. I will remove the unused variable.