1
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 06:03:45 +01:00

cosmetics: Remove useless parentheses from from return statements.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26787 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2008-05-16 08:33:27 +00:00
parent c1f5c9bd3f
commit ad603f5559
22 changed files with 82 additions and 82 deletions

View File

@ -368,7 +368,7 @@ static int mga_init(int width,int height,unsigned int format){
mga_vid_config.format=MGA_VID_FORMAT_UYVY; break;
default:
mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_InvalidOutputFormat,format);
return (-1);
return -1;
}
mga_vid_config.src_width = width;
@ -386,7 +386,7 @@ static int mga_init(int width,int height,unsigned int format){
if(width > 1024 && height > 1024)
{
mp_msg(MSGT_VO,MSGL_ERR, MGSTR_LIBVO_MGA_ResolutionTooHigh);
return (-1);
return -1;
} else if(height <= 1024)
{
// try whether we have a G550
@ -397,7 +397,7 @@ static int mga_init(int width,int height,unsigned int format){
{
// we don't have a G550, so our resolution is too high
mp_msg(MSGT_VO,MSGL_ERR, MGSTR_LIBVO_MGA_ResolutionTooHigh);
return (-1);
return -1;
} else {
// there is a deeper problem
// we have a G550, but still couldn't configure mga_vid
@ -457,7 +457,7 @@ static int preinit(const char *vo_subdevice)
{
perror("open");
mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldntOpen,devname);
return(-1);
return -1;
}
#ifdef VO_XMGA

View File

@ -134,7 +134,7 @@ static int draw_frame(uint8_t *src[]){
}
static int query_format(uint32_t format){
return(vidix_query_fourcc(format));
return vidix_query_fourcc(format);
}
static void uninit(void){

View File

@ -917,11 +917,11 @@ query_format( uint32_t format )
return 0;
}
return (VFCAP_HWSCALE_UP |
return VFCAP_HWSCALE_UP |
VFCAP_HWSCALE_DOWN |
VFCAP_CSP_SUPPORTED_BY_HW |
VFCAP_CSP_SUPPORTED |
VFCAP_OSD);
VFCAP_OSD;
}
static void

View File

@ -119,11 +119,11 @@ static int vd_EnableMode(int depth, int bitspp,
static int vd_ModeEqual(int depth, int bitspp,
int rmask, int gmask, int bmask, int index)
{
return ((vo_dga_modes[index].vdm_depth == depth &&
return (vo_dga_modes[index].vdm_depth == depth &&
vo_dga_modes[index].vdm_bitspp == bitspp &&
vo_dga_modes[index].vdm_rmask == rmask &&
vo_dga_modes[index].vdm_gmask == gmask &&
vo_dga_modes[index].vdm_bmask == bmask) ? 1 : 0);
vo_dga_modes[index].vdm_bmask == bmask) ? 1 : 0;
}
@ -964,7 +964,7 @@ static uint32_t get_image(mp_image_t * mpi)
|| (mpi->type == MP_IMGTYPE_STATIC && vo_dga_nr_video_buffers > 1)
|| (mpi->type == MP_IMGTYPE_IP && vo_dga_nr_video_buffers < 2)
|| (mpi->type == MP_IMGTYPE_IPB))
return (VO_FALSE);
return VO_FALSE;
if ((mpi->flags & MP_IMGFLAG_ACCEPT_STRIDE) ||
(mpi->flags & MP_IMGFLAG_ACCEPT_WIDTH &&
@ -978,10 +978,10 @@ static uint32_t get_image(mp_image_t * mpi)
mpi->width =
(vo_dga_bytes_per_line + vo_dga_vp_skip) / (mpi->bpp / 8);
mpi->flags |= MP_IMGFLAG_DIRECT;
return (VO_TRUE);
return VO_TRUE;
}
return (VO_FALSE);
return VO_FALSE;
}
static int control(uint32_t request, void *data, ...)

View File

@ -1429,7 +1429,7 @@ static int control(uint32_t request, void *data, ...)
value = va_arg(ap, int);
va_end(ap);
return(directfb_set_video_eq(data, value));
return directfb_set_video_eq(data, value);
}
case VOCTRL_GET_EQUALIZER:
{
@ -1440,7 +1440,7 @@ static int control(uint32_t request, void *data, ...)
value = va_arg(ap, int*);
va_end(ap);
return(directfb_get_video_eq(data, value));
return directfb_get_video_eq(data, value);
}
};
return VO_NOTIMPL;

View File

@ -1038,7 +1038,7 @@ static int query_format(uint32_t format)
return 0;
#ifdef CONFIG_VIDIX
if(vidix_name)
return (vidix_query_fourcc(format));
return vidix_query_fourcc(format);
#endif
if ((format & IMGFMT_BGR_MASK) == IMGFMT_BGR) {
int bpp = format & 0xff;
@ -1140,8 +1140,8 @@ static int preinit(const char *vo_subdevice)
fb_dev_name = strdup(vo_subdevice);
}
}
if(!pre_init_err) return (pre_init_err=(fb_preinit(0)?0:-1));
return(-1);
if(!pre_init_err) return pre_init_err = (fb_preinit(0) ? 0 : -1);
return -1;
}
static uint32_t get_image(mp_image_t *mpi)
@ -1155,12 +1155,12 @@ static uint32_t get_image(mp_image_t *mpi)
(mpi->width != in_width) ||
(mpi->height != in_height)
)
return(VO_FALSE);
return VO_FALSE;
mpi->planes[0] = center;
mpi->stride[0] = fb_line_len;
mpi->flags |= MP_IMGFLAG_DIRECT;
return(VO_TRUE);
return VO_TRUE;
}
static int control(uint32_t request, void *data, ...)

View File

@ -141,17 +141,17 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
if (ggiSetMode(ggi_conf.vis, &mode) < 0) {
mp_msg(MSGT_VO, MSGL_ERR, "[ggi] unable to set display mode\n");
return (-1);
return -1;
}
if (ggiGetMode(ggi_conf.vis, &mode) < 0) {
mp_msg(MSGT_VO, MSGL_ERR, "[ggi] unable to get display mode\n");
return (-1);
return -1;
}
if ((mode.graphtype == GT_INVALID)
|| (mode.graphtype == GT_AUTO))
{
mp_msg(MSGT_VO, MSGL_ERR, "[ggi] not supported depth/bpp\n");
return (-1);
return -1;
}
#if 0
@ -221,7 +221,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
} else {
mp_msg(MSGT_VO, MSGL_FATAL, "[ggi] Unknown image format: %s\n",
vo_format_name(ggi_conf.srcformat));
return (-1);
return -1;
}
mp_msg(MSGT_VO, MSGL_INFO, "[ggi] input: %dx%dx%d, output: %dx%dx%d\n",
@ -235,7 +235,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
ggi_conf.flushregion.x2 = vo_dwidth;
ggi_conf.flushregion.y2 = vo_dheight;
return (0);
return 0;
}
static uint32_t get_image(mp_image_t *mpi)
@ -244,19 +244,19 @@ static uint32_t get_image(mp_image_t *mpi)
if (!((IMGFMT_IS_BGR(mpi->imgfmt)) &&
(IMGFMT_BGR_DEPTH(mpi->imgfmt) == vo_dbpp)))
{
return (VO_FALSE);
return VO_FALSE;
}
if (!((IMGFMT_IS_RGB(mpi->imgfmt)) &&
(IMGFMT_RGB_DEPTH(mpi->imgfmt) == vo_dbpp)))
{
return (VO_FALSE);
return VO_FALSE;
}
if (!((mpi->width == ggi_conf.srcwidth) &&
(mpi->height == ggi_conf.srcheight)))
{
return (VO_FALSE);
return VO_FALSE;
}
mpi->planes[1] = mpi->planes[2] = NULL;
@ -272,7 +272,7 @@ static uint32_t get_image(mp_image_t *mpi)
}
#endif
return (VO_TRUE);
return VO_TRUE;
}
@ -286,7 +286,7 @@ static int draw_frame(uint8_t *src[])
ggi_conf.flushregion.x2 = vo_dwidth;
ggi_conf.flushregion.y2 = vo_dheight;
return (0);
return 0;
}
static void draw_osd(void)
@ -346,7 +346,7 @@ static int draw_slice(uint8_t *src[], int stride[],
ggi_conf.flushregion.y2 = vo_dy + y + h;
}
return (1);
return 1;
}
static int query_format(uint32_t format)
@ -386,19 +386,19 @@ static int query_format(uint32_t format)
return vfcap;
}
}
return (0);
return 0;
}
static int preinit(const char *arg)
{
if (ggiInit() != 0) {
mp_msg(MSGT_VO, MSGL_FATAL, "[ggi] unable to initialize GGI\n");
return (-1);
return -1;
}
#ifdef HAVE_GGIWMH
if (ggiWmhInit() < 0) {
mp_msg(MSGT_VO, MSGL_FATAL, "[ggi] unable to initialize libggiwmh\n");
return (-1);
return -1;
}
#endif
@ -419,7 +419,7 @@ static int preinit(const char *arg)
mp_msg(MSGT_VO, MSGL_FATAL, "[ggi] unable to open '%s' output\n",
(ggi_conf.driver == NULL) ? "default" : ggi_conf.driver);
ggiExit();
return (-1);
return -1;
}
ggi_conf.drawvis = ggi_conf.vis;

View File

@ -915,8 +915,8 @@ static int preinit(const char *arg)
static int control(uint32_t request, void *data, ...)
{
switch (request) {
case VOCTRL_PAUSE: return (int_pause=1);
case VOCTRL_RESUME: return (int_pause=0);
case VOCTRL_PAUSE: return int_pause = 1;
case VOCTRL_RESUME: return int_pause = 0;
case VOCTRL_QUERY_FORMAT:
return query_format(*((uint32_t*)data));
case VOCTRL_GET_IMAGE:

View File

@ -870,8 +870,8 @@ static int preinit(const char *arg)
static int control(uint32_t request, void *data, ...)
{
switch (request) {
case VOCTRL_PAUSE: return (int_pause=1);
case VOCTRL_RESUME: return (int_pause=0);
case VOCTRL_PAUSE: return int_pause = 1;
case VOCTRL_RESUME: return int_pause = 0;
case VOCTRL_QUERY_FORMAT:
return query_format(*((uint32_t*)data));
case VOCTRL_GUISUPPORT:

View File

@ -363,8 +363,8 @@ static int control(uint32_t request, void *data, ...)
{
switch (request)
{
case VOCTRL_PAUSE: return (int_pause=1);
case VOCTRL_RESUME: return (int_pause=0);
case VOCTRL_PAUSE: return int_pause = 1;
case VOCTRL_RESUME: return int_pause = 0;
case VOCTRL_QUERY_FORMAT: return query_format(*((uint32_t*)data));
case VOCTRL_ONTOP: vo_ontop = (!(vo_ontop)); if(!shared_buffer){ [mpGLView ontop]; } else { [mplayerosxProto ontop]; } return VO_TRUE;
case VOCTRL_ROOTWIN: vo_rootwin = (!(vo_rootwin)); [mpGLView rootwin]; return VO_TRUE;

View File

@ -1236,8 +1236,8 @@ static int control(uint32_t request, void *data, ...)
{
switch (request)
{
case VOCTRL_PAUSE: return (int_pause=1);
case VOCTRL_RESUME: return (int_pause=0);
case VOCTRL_PAUSE: return int_pause = 1;
case VOCTRL_RESUME: return int_pause = 0;
case VOCTRL_FULLSCREEN: vo_fs = (!(vo_fs)); window_fullscreen(); return VO_TRUE;
case VOCTRL_ONTOP: vo_ontop = (!(vo_ontop)); window_ontop(); return VO_TRUE;
case VOCTRL_QUERY_FORMAT: return query_format(*((uint32_t*)data));

View File

@ -574,7 +574,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
#endif
vga_setdisplaystart(0);
return (0);
return 0;
}
static int draw_slice(uint8_t *image[],int stride[],
@ -723,7 +723,7 @@ int page;
if(!IMGFMT_IS_BGR(mpi->imgfmt) && !IMGFMT_IS_RGB(mpi->imgfmt) ){
assert(0);//should never happen
return(VO_FALSE);
return VO_FALSE;
}
if (
@ -731,7 +731,7 @@ int page;
(mpi->flags & MP_IMGFLAG_PLANAR) ||
(mpi->flags & MP_IMGFLAG_YUV)
)
return(VO_FALSE);
return VO_FALSE;
//reading from video memory is horribly slow
if( !(mpi->flags & MP_IMGFLAG_READABLE) && vo_directrendering &&
@ -749,9 +749,9 @@ int page;
mpi->priv=(void *)page;
if( mp_msg_test(MSGT_VO,MSGL_DBG3) )
mp_msg(MSGT_VO,MSGL_DBG3, "vo_svga: direct render allocated! page=%d\n",page);
return(VO_TRUE);
return VO_TRUE;
}
}
return(VO_FALSE);
return VO_FALSE;
}

View File

@ -165,7 +165,7 @@ static int write_tga( char *file, int bpp, int dx, int dy, uint8_t *buf, int str
if (er) {
fprintf(stderr, "Error writing file [%s]\n", file);
}
return(er);
return er;
}
static uint32_t draw_image(mp_image_t* mpi)

View File

@ -460,7 +460,7 @@ static int query_format(uint32_t format)
if( mp_msg_test(MSGT_VO,MSGL_DBG3) )
mp_msg(MSGT_VO,MSGL_DBG3, "vo_vesa: query_format was called: %x (%s)\n",format,vo_format_name(format));
#ifdef CONFIG_VIDIX
if(vidix_name)return(vidix_query_fourcc(format));
if(vidix_name) return vidix_query_fourcc(format);
#endif
if (format == IMGFMT_MPEGPES)
return 0;

View File

@ -256,7 +256,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,uint32_t d_h
ShowWindow(hWnd,SW_SHOW);
if(vo_fs)ShowWindow(hWndFS,SW_SHOW);
return(0);
return 0;
}
static void check_events(void){
@ -288,17 +288,17 @@ static int draw_slice(uint8_t *src[], int stride[],int w, int h, int x, int y){
UNUSED(x);
UNUSED(y);
mp_msg(MSGT_VO, MSGL_FATAL, "[winvidix] error: didn't use vidix draw_slice!\n");
return(-1);
return -1;
}
static int draw_frame(uint8_t *src[]){
UNUSED(src);
mp_msg(MSGT_VO, MSGL_FATAL, "[winvidix] error: didn't use vidix draw_frame!\n");
return(-1);
return -1;
}
static int query_format(uint32_t format){
return(vidix_query_fourcc(format));
return vidix_query_fourcc(format);
}
static void uninit(void){
@ -324,9 +324,9 @@ static int preinit(const char *arg){
}
if (vidix_preinit(vidix_name, &video_out_winvidix) != 0)
return(1);
return 1;
return(0);
return 0;
}
static int control(uint32_t request, void *data, ...){

View File

@ -667,7 +667,7 @@ static uint32_t get_image(mp_image_t * mpi)
|| (mpi->flags & MP_IMGFLAG_PLANAR)
|| (mpi->flags & MP_IMGFLAG_YUV) || (mpi->width != image_width)
|| (mpi->height != image_height))
return (VO_FALSE);
return VO_FALSE;
if (Flip_Flag)
{
@ -680,7 +680,7 @@ static uint32_t get_image(mp_image_t * mpi)
}
mpi->flags |= MP_IMGFLAG_DIRECT;
return (VO_TRUE);
return VO_TRUE;
}
static int query_format(uint32_t format)
@ -753,9 +753,9 @@ static int control(uint32_t request, void *data, ...)
switch (request)
{
case VOCTRL_PAUSE:
return (int_pause = 1);
return int_pause = 1;
case VOCTRL_RESUME:
return (int_pause = 0);
return int_pause = 0;
case VOCTRL_QUERY_FORMAT:
return query_format(*((uint32_t *) data));
case VOCTRL_GUISUPPORT:

View File

@ -332,7 +332,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
panscan_calc();
return(0);
return 0;
}
static void check_events(void)

View File

@ -852,9 +852,9 @@ static int control(uint32_t request, void *data, ...)
switch (request)
{
case VOCTRL_PAUSE:
return (int_pause = 1);
return int_pause = 1;
case VOCTRL_RESUME:
return (int_pause = 0);
return int_pause = 0;
case VOCTRL_QUERY_FORMAT:
return query_format(*((uint32_t *) data));
case VOCTRL_GET_IMAGE:
@ -902,7 +902,7 @@ static int control(uint32_t request, void *data, ...)
va_end(ap);
return (vo_xv_set_eq(xv_port, data, value));
return vo_xv_set_eq(xv_port, data, value);
}
case VOCTRL_GET_EQUALIZER:
{
@ -914,7 +914,7 @@ static int control(uint32_t request, void *data, ...)
va_end(ap);
return (vo_xv_get_eq(xv_port, data, value));
return vo_xv_get_eq(xv_port, data, value);
}
case VOCTRL_ONTOP:
vo_x11_ontop();

View File

@ -378,7 +378,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
if (vo_ontop)
vo_x11_setlayer(mDisplay, vo_window, vo_ontop);
return (0);
return 0;
}
static void check_events(void)
@ -418,7 +418,7 @@ static int draw_slice(uint8_t * src[], int stride[],
UNUSED(y);
mp_msg(MSGT_VO, MSGL_FATAL,
"[xvidix] error: didn't used vidix draw_slice!\n");
return (-1);
return -1;
}
static int draw_frame(uint8_t * src[])
@ -426,12 +426,12 @@ static int draw_frame(uint8_t * src[])
UNUSED(src);
mp_msg(MSGT_VO, MSGL_FATAL,
"[xvidix] error: didn't used vidix draw_frame!\n");
return (-1);
return -1;
}
static int query_format(uint32_t format)
{
return (vidix_query_fourcc(format));
return vidix_query_fourcc(format);
}
static void uninit(void)
@ -462,12 +462,12 @@ static int preinit(const char *arg)
}
if (!vo_init())
return (-1);
return -1;
if (vidix_preinit(vidix_name, &video_out_xvidix) != 0)
return (1);
return 1;
return (0);
return 0;
}
static int control(uint32_t request, void *data, ...)

View File

@ -1410,7 +1410,7 @@ static int control(uint32_t request, void *data, ... )
value = va_arg(ap, int);
va_end(ap);
return(vo_xv_set_eq(xv_port, data, value));
return vo_xv_set_eq(xv_port, data, value);
}
case VOCTRL_GET_EQUALIZER:
@ -1422,7 +1422,7 @@ static int control(uint32_t request, void *data, ... )
value = va_arg(ap, int*);
va_end(ap);
return(vo_xv_get_eq(xv_port, data, value));
return vo_xv_get_eq(xv_port, data, value);
}
case VOCTRL_UPDATE_SCREENINFO:
update_xinerama_info();

View File

@ -318,17 +318,17 @@ uint32_t vidix_query_fourcc(uint32_t format)
int vidix_grkey_support(void)
{
return(vidix_fourcc.flags & VID_CAP_COLORKEY);
return vidix_fourcc.flags & VID_CAP_COLORKEY;
}
int vidix_grkey_get(vidix_grkey_t *gr_key)
{
return(vdlGetGrKeys(vidix_handler, gr_key));
return vdlGetGrKeys(vidix_handler, gr_key);
}
int vidix_grkey_set(const vidix_grkey_t *gr_key)
{
return(vdlSetGrKeys(vidix_handler, gr_key));
return vdlSetGrKeys(vidix_handler, gr_key);
}

View File

@ -279,11 +279,11 @@ static int x11_get_property(Atom type, Atom ** args, unsigned long *nitems)
int format;
unsigned long bytesafter;
return (Success ==
return Success ==
XGetWindowProperty(mDisplay, mRootWin, type, 0, 16384, False,
AnyPropertyType, &type, &format, nitems,
&bytesafter, (unsigned char **) args)
&& *nitems > 0);
&& *nitems > 0;
}
static int vo_wm_detect(void)
@ -2102,10 +2102,10 @@ int vo_xv_set_eq(uint32_t xv_port, char *name, int value)
(port_value + 100) * (port_max - port_min) / 200 +
port_min;
XvSetPortAttribute(mDisplay, xv_port, xv_atom, port_value);
return (VO_TRUE);
return VO_TRUE;
}
}
return (VO_FALSE);
return VO_FALSE;
}
int vo_xv_get_eq(uint32_t xv_port, char *name, int *value)
@ -2168,10 +2168,10 @@ int vo_xv_get_eq(uint32_t xv_port, char *name, int *value)
mp_dbg(MSGT_VO, MSGL_V, "xv_get_eq called! (%s, %d)\n",
name, *value);
return (VO_TRUE);
return VO_TRUE;
}
}
return (VO_FALSE);
return VO_FALSE;
}
/** \brief contains flags changing the execution of the colorkeying code */