[vlc-commits] Use SetWBE

Rémi Denis-Courmont git at videolan.org
Sat Mar 5 15:28:29 CET 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar  5 16:09:56 2011 +0200| [75099163051692e0334a18a2b0154bb204ce2008] | committer: Rémi Denis-Courmont

Use SetWBE

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=75099163051692e0334a18a2b0154bb204ce2008
---

 modules/access/dvb/en50221.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/access/dvb/en50221.c b/modules/access/dvb/en50221.c
index 429ac2d..0097ea9 100644
--- a/modules/access/dvb/en50221.c
+++ b/modules/access/dvb/en50221.c
@@ -1412,13 +1412,11 @@ static void DateTimeSend( access_t * p_access, int i_session_id )
 
 #define DEC2BCD(d) (((d / 10) << 4) + (d % 10))
 
-        p_response[0] = htons(MJD) >> 8;
-        p_response[1] = htons(MJD) & 0xff;
+        SetWBE( &p_response[0], MJD );
         p_response[2] = DEC2BCD(tm_gmt.tm_hour);
         p_response[3] = DEC2BCD(tm_gmt.tm_min);
         p_response[4] = DEC2BCD(tm_gmt.tm_sec);
-        p_response[5] = htons(tm_loc.tm_gmtoff / 60) >> 8;
-        p_response[6] = htons(tm_loc.tm_gmtoff / 60) & 0xff;
+        SetWBE( &p_response[5], tm_loc.tm_gmtoff / 60 );
 
         APDUSend( p_access, i_session_id, AOT_DATE_TIME, p_response, 7 );
 



More information about the vlc-commits mailing list