Skip to content

Commit

Permalink
Fix 32-bit int assumption and implicit narrowing cast in DVB CA.
Browse files Browse the repository at this point in the history
This was caught by C++ as invalid C++11 code, and compiles
to the wrong code in C++03 on ABI's with a 64 bit int.
  • Loading branch information
daniel-kristjansson committed Nov 26, 2012
1 parent 3310050 commit 9b7aec0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions mythtv/libs/libmythtv/recorders/dvbdev/dvbci.cpp
Expand Up @@ -847,12 +847,14 @@ bool cCiResourceManager::Process(int Length, const uint8_t *Data)
switch (Tag) {
case AOT_PROFILE_ENQ: {
dbgprotocol("%d: <== Profile Enquiry\n", SessionId());
int resources[] = { htonl(RI_RESOURCE_MANAGER),
htonl(RI_APPLICATION_INFORMATION),
htonl(RI_CONDITIONAL_ACCESS_SUPPORT),
htonl(RI_DATE_TIME),
htonl(RI_MMI)
};
uint32_t resources[] =
{
htonl(RI_RESOURCE_MANAGER),
htonl(RI_APPLICATION_INFORMATION),
htonl(RI_CONDITIONAL_ACCESS_SUPPORT),
htonl(RI_DATE_TIME),
htonl(RI_MMI)
};
dbgprotocol("%d: ==> Profile\n", SessionId());
SendData(AOT_PROFILE, sizeof(resources), (uint8_t*)resources);
state = 3;
Expand Down

0 comments on commit 9b7aec0

Please sign in to comment.