changeset 26758:9fb1d2c3dbd4

cosmetics: Remove pointless parentheses from return statements.
author diego
date Fri, 16 May 2008 09:41:00 +0000
parents 0fdf04b07ecb
children 8eff880f638c
files libmpdemux/demux_avs.h libmpdemux/demux_film.c libmpdemux/demux_fli.c libmpdemux/demux_xmms.c libmpdemux/demuxer.c libmpdemux/muxer_mpeg.c
diffstat 6 files changed, 17 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_avs.h	Fri May 16 09:31:55 2008 +0000
+++ b/libmpdemux/demux_avs.h	Fri May 16 09:41:00 2008 +0000
@@ -132,15 +132,15 @@
 static inline int avs_is_error(AVS_Value v) { return v.type == 'e'; }
 static inline int avs_is_clip(AVS_Value v) { return v.type == 'c'; }
 static inline int avs_is_string(AVS_Value v) { return v.type == 's'; }
-static inline int avs_has_video(const AVS_VideoInfo * p) { return (p->width!=0); }
-static inline int avs_has_audio(const AVS_VideoInfo * p) { return (p->audio_samples_per_second!=0); }
+static inline int avs_has_video(const AVS_VideoInfo * p) { return p->width != 0; }
+static inline int avs_has_audio(const AVS_VideoInfo * p) { return p->audio_samples_per_second != 0; }
 
 static inline const char * avs_as_string(AVS_Value v)
 { return avs_is_error(v) || avs_is_string(v) ? v.d.string : 0; }
 
 /* Color spaces */
 static inline int avs_is_rgb(const AVS_VideoInfo * p)
-{ return (p->pixel_type&AVS_CS_BGR); }
+{ return p->pixel_type & AVS_CS_BGR; }
 
 static inline int avs_is_rgb24(const AVS_VideoInfo * p)
 { return (p->pixel_type&AVS_CS_BGR24)==AVS_CS_BGR24; } // Clear out additional properties
@@ -149,7 +149,7 @@
 { return (p->pixel_type & AVS_CS_BGR32) == AVS_CS_BGR32 ; }
 
 static inline int avs_is_yuy(const AVS_VideoInfo * p)
-{ return (p->pixel_type&AVS_CS_YUV ); }
+{ return p->pixel_type & AVS_CS_YUV; }
 
 static inline int avs_is_yuy2(const AVS_VideoInfo * p)
 { return (p->pixel_type & AVS_CS_YUY2) == AVS_CS_YUY2; }  
--- a/libmpdemux/demux_film.c	Fri May 16 09:31:55 2008 +0000
+++ b/libmpdemux/demux_film.c	Fri May 16 09:41:00 2008 +0000
@@ -238,7 +238,7 @@
   {
     mp_msg(MSGT_DEMUX, MSGL_ERR, "Not a FILM file\n");
     free(film_data);
-    return(NULL);    
+    return NULL;
   }
 
   // get the header size, which implicitly points past the header and
@@ -428,7 +428,7 @@
     default:
       mp_msg(MSGT_DEMUX, MSGL_ERR, "Unrecognized FILM header chunk: %08X\n",
         chunk_type);
-      return(NULL);    
+      return NULL;
       break;
     }
   }
--- a/libmpdemux/demux_fli.c	Fri May 16 09:31:55 2008 +0000
+++ b/libmpdemux/demux_fli.c	Fri May 16 09:41:00 2008 +0000
@@ -95,7 +95,7 @@
 	magic_number);
     free(header);
     free(frames);
-    return(NULL);    
+    return NULL;
   }
 
   // fetch the number of frames
--- a/libmpdemux/demux_xmms.c	Fri May 16 09:31:55 2008 +0000
+++ b/libmpdemux/demux_xmms.c	Fri May 16 09:41:00 2008 +0000
@@ -75,8 +75,8 @@
 }
 
 static int disk_free(void) { // vqf plugin sends more than it should
-    return (XMMS_PACKETSIZE-xmms_audiopos<XMMS_PACKETSIZE/4 ?
-                            0:XMMS_PACKETSIZE-xmms_audiopos-XMMS_PACKETSIZE/4);
+    return XMMS_PACKETSIZE - xmms_audiopos < XMMS_PACKETSIZE / 4 ?
+               0 : XMMS_PACKETSIZE - xmms_audiopos - XMMS_PACKETSIZE / 4;
 }
 
 static int disk_playing(void) {
--- a/libmpdemux/demuxer.c	Fri May 16 09:31:55 2008 +0000
+++ b/libmpdemux/demuxer.c	Fri May 16 09:41:00 2008 +0000
@@ -1236,7 +1236,7 @@
             }
         }
 
-        return (ris != STREAM_UNSUPPORTED ? chapter : -1);
+        return ris != STREAM_UNSUPPORTED ? chapter : -1;
     } else {  //chapters structure is set in the demuxer
         total = demuxer->num_chapters;
 
--- a/libmpdemux/muxer_mpeg.c	Fri May 16 09:31:55 2008 +0000
+++ b/libmpdemux/muxer_mpeg.c	Fri May 16 09:41:00 2008 +0000
@@ -231,27 +231,25 @@
 
 static inline int is_mpeg1(uint32_t x)
 {
-	return (
+	return
 		(x == 0x10000001) ||
 		(x == mmioFOURCC('m','p','g','1')) ||
-		(x == mmioFOURCC('M','P','G','1'))
-	);
+		(x == mmioFOURCC('M','P','G','1'));
 }
 
 static inline int is_mpeg2(uint32_t x)
 {
-	return (
+	return
 		(x == 0x10000002) ||
 		(x == mmioFOURCC('m','p','g','2')) ||
 		(x == mmioFOURCC('M','P','G','2')) ||
 		(x == mmioFOURCC('m','p','e','g')) ||
-		(x == mmioFOURCC('M','P','E','G'))
-	);
+		(x == mmioFOURCC('M','P','E','G'));
 }
 
 static inline int is_mpeg4(uint32_t x)
 {
-	return (
+	return
 		(x == 0x10000004) ||
 		(x == mmioFOURCC('d','i','v','x')) ||
 		(x == mmioFOURCC('D','I','V','X')) ||
@@ -265,8 +263,7 @@
 		(x == mmioFOURCC('F', 'M','P','4')) ||
 		(x == mmioFOURCC('f', 'm','p','4')) ||
 		(x == mmioFOURCC('D', 'X','5','0')) ||
-		(x == mmioFOURCC('d', 'x','5','0'))
-	);
+		(x == mmioFOURCC('d', 'x','5','0'));
 }
 
 //from unrarlib.c
@@ -666,7 +663,7 @@
 
 static int psm_is_late(muxer_priv_t *priv)
 {
-	return (!priv->data_size || (priv->scr >= priv->last_psm_scr + 27000000ULL));
+	return !priv->data_size || (priv->scr >= priv->last_psm_scr + 27000000ULL);
 }
 
 static int write_mpeg_pes_header(muxer_headers_t *h, uint8_t *pes_id, uint8_t *buff, uint16_t plen, int stuffing_len, int mux_type)