[vlc-commits] service_discovery:sap: use __MIN instead of local function

Steve Lhomme git at videolan.org
Tue Sep 18 15:56:05 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jun 13 11:35:30 2018 +0200| [c345215c48183bcafe696d1d398d53f1732fcd56] | committer: Steve Lhomme

service_discovery:sap: use __MIN instead of local function

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

 modules/services_discovery/sap.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c
index 44b79a23af..ed0f99abd0 100644
--- a/modules/services_discovery/sap.c
+++ b/modules/services_discovery/sap.c
@@ -264,11 +264,6 @@ typedef struct
     static int Decompress( const unsigned char *psz_src, unsigned char **_dst, int i_len );
     static void FreeSDP( sdp_t *p_sdp );
 
-static inline int min_int( int a, int b )
-{
-    return a > b ? b : a;
-}
-
 static bool IsWellKnownPayload (int type)
 {
     switch (type)
@@ -595,8 +590,8 @@ static void *Run( void *data )
             {
                 /* Compute next timeout */
                 if( p_announce->i_period_trust > 5 )
-                    timeout = min_int((10 * p_announce->i_period - i_last_period) / 1000, timeout);
-                timeout = min_int((i_timeout - i_last_period)/1000, timeout);
+                    timeout = __MIN((10 * p_announce->i_period - i_last_period) / 1000, timeout);
+                timeout = __MIN((i_timeout - i_last_period)/1000, timeout);
             }
         }
 



More information about the vlc-commits mailing list