[MPlayer-cvslog] r26791 - in trunk: TOOLS/fastmemcpybench.c TOOLS/movinfo.c command.c configure cpudetect.c drivers/mga_vid.c drivers/radeon_vid.c drivers/tdfx_vid.c input/joystick.c libaf/window.c libass/ass_cache.c libmenu/vf_menu.c osdep/getch2-win.c osdep/shmem.c osdep/timer-linux.c spudec.c subreader.c
diego
subversion at mplayerhq.hu
Fri May 16 11:42:28 CEST 2008
Author: diego
Date: Fri May 16 11:42:28 2008
New Revision: 26791
Log:
cosmetics: Remove useless parentheses from return statements.
Modified:
trunk/TOOLS/fastmemcpybench.c
trunk/TOOLS/movinfo.c
trunk/command.c
trunk/configure
trunk/cpudetect.c
trunk/drivers/mga_vid.c
trunk/drivers/radeon_vid.c
trunk/drivers/tdfx_vid.c
trunk/input/joystick.c
trunk/libaf/window.c
trunk/libass/ass_cache.c
trunk/libmenu/vf_menu.c
trunk/osdep/getch2-win.c
trunk/osdep/shmem.c
trunk/osdep/timer-linux.c
trunk/spudec.c
trunk/subreader.c
Modified: trunk/TOOLS/fastmemcpybench.c
==============================================================================
--- trunk/TOOLS/fastmemcpybench.c (original)
+++ trunk/TOOLS/fastmemcpybench.c Fri May 16 11:42:28 2008
@@ -34,7 +34,7 @@ static int mga_init(){
if(f == -1)
{
fprintf(stderr,"Couldn't open /dev/mga_vid\n");
- return(-1);
+ return -1;
}
mga_vid_config.num_frames=1;
@@ -80,7 +80,7 @@ static unsigned int GetTimer(){
// float s;
gettimeofday(&tv,&tz);
// s=tv.tv_usec;s*=0.000001;s+=tv.tv_sec;
- return (tv.tv_sec*1000000+tv.tv_usec);
+ return tv.tv_sec * 1000000 + tv.tv_usec;
}
static inline unsigned long long int read_tsc( void )
Modified: trunk/TOOLS/movinfo.c
==============================================================================
--- trunk/TOOLS/movinfo.c (original)
+++ trunk/TOOLS/movinfo.c Fri May 16 11:42:28 2008
@@ -26,28 +26,28 @@ static char *atom2human_type(int type)
{
switch (type)
{
- case 0x766F6F6D: return ("Information sections"); /* moov */
- case 0x6468766D: return ("Movie header"); /* mvhd */
- case 0x6169646D: return ("Media stream"); /* mdia */
- case 0x64686D76: return ("Video media header"); /* vmhd */
- case 0x64686D73: return ("Sound media header"); /* smhd */
- case 0x6468646D: return ("Media header"); /* mdhd */
- case 0x666E696D: return ("Media information"); /* minf */
- case 0x726C6468: return ("Handler reference"); /* hdlr */
- case 0x6B617274: return ("New track (stream)"); /* trak */
- case 0x75716D72: return ("rmqu");
- case 0x65657266: return ("free");
- case 0x64686B74: return ("Track header"); /* tkhd */
- case 0x61746475: return ("User data"); /* udta */
- case 0x7461646D: return ("Movie data"); /* mdat */
- case 0x6C627473: return ("Sample information table"); /* stbl */
- case 0x64737473: return ("Sample description"); /* stsd */
- case 0x6F637473: return ("Chunk offset table"); /* stco */
- case 0x73747473: return ("Sample time table"); /* stts */
- case 0x63737473: return ("Sample->Chunk mapping table"); /* stsc */
- case 0x7A737473: return ("Sample size table"); /* stsz */
+ case 0x766F6F6D: return "Information sections"; /* moov */
+ case 0x6468766D: return "Movie header"; /* mvhd */
+ case 0x6169646D: return "Media stream"; /* mdia */
+ case 0x64686D76: return "Video media header"; /* vmhd */
+ case 0x64686D73: return "Sound media header"; /* smhd */
+ case 0x6468646D: return "Media header"; /* mdhd */
+ case 0x666E696D: return "Media information"; /* minf */
+ case 0x726C6468: return "Handler reference"; /* hdlr */
+ case 0x6B617274: return "New track (stream)"; /* trak */
+ case 0x75716D72: return "rmqu";
+ case 0x65657266: return "free";
+ case 0x64686B74: return "Track header"; /* tkhd */
+ case 0x61746475: return "User data"; /* udta */
+ case 0x7461646D: return "Movie data"; /* mdat */
+ case 0x6C627473: return "Sample information table"; /* stbl */
+ case 0x64737473: return "Sample description"; /* stsd */
+ case 0x6F637473: return "Chunk offset table"; /* stco */
+ case 0x73747473: return "Sample time table"; /* stts */
+ case 0x63737473: return "Sample->Chunk mapping table"; /* stsc */
+ case 0x7A737473: return "Sample size table"; /* stsz */
}
- return("unknown");
+ return "unknown";
}
#define S_NONE 0
Modified: trunk/command.c
==============================================================================
--- trunk/command.c (original)
+++ trunk/command.c Fri May 16 11:42:28 2008
@@ -1899,7 +1899,7 @@ static int mp_property_teletext_common(m
return M_PROPERTY_NOT_IMPLEMENTED;
}
- return (result==TVI_CONTROL_TRUE?M_PROPERTY_OK:M_PROPERTY_ERROR);
+ return result == TVI_CONTROL_TRUE ? M_PROPERTY_OK : M_PROPERTY_ERROR;
}
static int mp_property_teletext_mode(m_option_t * prop, int action, void *arg,
Modified: trunk/configure
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Fri May 16 11:42:28 2008
@@ -1565,7 +1565,7 @@ if x86 && test "$_runtime_cpudetection"
void catch() { exit(1); }
int main(void) {
signal(SIGILL, catch);
- __asm__ __volatile__ ("$3":::"memory");return(0);
+ __asm__ __volatile__ ("$3":::"memory"); return 0;
}
EOF
@@ -4512,7 +4512,7 @@ cat > $TMPC << EOF
int main(void) {
printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
printf("libpng: %s\n", png_libpng_ver);
- return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
+ return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
}
EOF
if cc_check -lpng -lz $_ld_lm ; then
Modified: trunk/cpudetect.c
==============================================================================
--- trunk/cpudetect.c (original)
+++ trunk/cpudetect.c Fri May 16 11:42:28 2008
@@ -79,7 +79,7 @@ static int has_cpuid(void)
: "cc"
);
- return (a!=c);
+ return a != c;
}
#endif
Modified: trunk/drivers/mga_vid.c
==============================================================================
--- trunk/drivers/mga_vid.c (original)
+++ trunk/drivers/mga_vid.c Fri May 16 11:42:28 2008
@@ -1207,27 +1207,27 @@ static int mga_vid_ioctl(struct inode *i
if(copy_from_user(&card->config,(mga_vid_config_t*) arg,sizeof(mga_vid_config_t)))
{
printk(KERN_ERR "mga_vid: failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
if(card->config.version != MGA_VID_VERSION){
printk(KERN_ERR "mga_vid: incompatible version! driver: %X requested: %X\n",MGA_VID_VERSION,card->config.version);
- return(-EFAULT);
+ return -EFAULT;
}
if(card->config.frame_size==0 || card->config.frame_size>1024*768*2){
printk(KERN_ERR "mga_vid: illegal frame_size: %d\n",card->config.frame_size);
- return(-EFAULT);
+ return -EFAULT;
}
if(card->config.num_frames<1 || card->config.num_frames>4){
printk(KERN_ERR "mga_vid: illegal num_frames: %d\n",card->config.num_frames);
- return(-EFAULT);
+ return -EFAULT;
}
card->src_base = (card->ram_size * 0x100000 - card->config.num_frames * card->config.frame_size - card->top_reserved);
if(card->src_base<0){
printk(KERN_ERR "mga_vid: not enough memory for frames!\n");
- return(-EFAULT);
+ return -EFAULT;
}
card->src_base &= (~0xFFFF); // 64k boundary
#ifdef MP_DEBUG
@@ -1244,7 +1244,7 @@ static int mga_vid_ioctl(struct inode *i
if (copy_to_user((mga_vid_config_t *) arg, &card->config, sizeof(mga_vid_config_t)))
{
printk(KERN_ERR "mga_vid: failed copy to userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
result = mga_vid_set_config(card);
@@ -1285,7 +1285,7 @@ static int mga_vid_ioctl(struct inode *i
if(copy_from_user(&frame,(int *) arg,sizeof(int)))
{
printk(KERN_ERR "mga_vid: FSEL failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
mga_vid_frame_sel(card, frame);
@@ -1300,7 +1300,7 @@ static int mga_vid_ioctl(struct inode *i
{
printk(KERN_ERR "mga_vid: failed copy %p to userspace %p\n",
&tmp, (uint32_t *) arg);
- return(-EFAULT);
+ return -EFAULT;
}
break;
@@ -1314,7 +1314,7 @@ static int mga_vid_ioctl(struct inode *i
default:
printk(KERN_ERR "mga_vid: Invalid ioctl\n");
- return (-EINVAL);
+ return -EINVAL;
}
return 0;
@@ -1464,17 +1464,17 @@ static int mga_vid_mmap(struct file *fil
if(!card->configured)
{
printk(KERN_ERR "mga_vid: card is not configured, cannot mmap\n");
- return(-EAGAIN);
+ return -EAGAIN;
}
if(remap_page_range(vma->vm_start, card->mem_base + card->src_base,
vma->vm_end - vma->vm_start, vma->vm_page_prot))
{
printk(KERN_ERR "mga_vid: error mapping video memory\n");
- return(-EAGAIN);
+ return -EAGAIN;
}
- return(0);
+ return 0;
}
static int mga_vid_release(struct inode *inode, struct file *file)
@@ -1517,7 +1517,7 @@ static int mga_vid_open(struct inode *in
// we don't have that many cards
if(minor >= mga_cards_num)
- return(-ENXIO);
+ return -ENXIO;
file->private_data = mga_cards[minor];
#ifdef MP_DEBUG
@@ -1533,11 +1533,11 @@ static int mga_vid_open(struct inode *in
card = (mga_card_t *) file->private_data;
if(card->vid_in_use == 1)
- return(-EBUSY);
+ return -EBUSY;
card->vid_in_use = 1;
MOD_INC_USE_COUNT;
- return(0);
+ return 0;
}
#if LINUX_VERSION_CODE >= 0x020400
@@ -1735,7 +1735,7 @@ static int mga_vid_initialize(void)
}
#endif
- return(0);
+ return 0;
}
int init_module(void)
Modified: trunk/drivers/radeon_vid.c
==============================================================================
--- trunk/drivers/radeon_vid.c (original)
+++ trunk/drivers/radeon_vid.c Fri May 16 11:42:28 2008
@@ -336,47 +336,47 @@ static char *fourcc_format_name(int form
{
switch(format)
{
- case IMGFMT_RGB8: return("RGB 8-bit");
- case IMGFMT_RGB15: return("RGB 15-bit");
- case IMGFMT_RGB16: return("RGB 16-bit");
- case IMGFMT_RGB24: return("RGB 24-bit");
- case IMGFMT_RGB32: return("RGB 32-bit");
- case IMGFMT_BGR8: return("BGR 8-bit");
- case IMGFMT_BGR15: return("BGR 15-bit");
- case IMGFMT_BGR16: return("BGR 16-bit");
- case IMGFMT_BGR24: return("BGR 24-bit");
- case IMGFMT_BGR32: return("BGR 32-bit");
- case IMGFMT_YVU9: return("Planar YVU9");
- case IMGFMT_IF09: return("Planar IF09");
- case IMGFMT_YV12: return("Planar YV12");
- case IMGFMT_I420: return("Planar I420");
- case IMGFMT_IYUV: return("Planar IYUV");
- case IMGFMT_CLPL: return("Planar CLPL");
- case IMGFMT_Y800: return("Planar Y800");
- case IMGFMT_Y8: return("Planar Y8");
- case IMGFMT_IUYV: return("Packed IUYV");
- case IMGFMT_IY41: return("Packed IY41");
- case IMGFMT_IYU1: return("Packed IYU1");
- case IMGFMT_IYU2: return("Packed IYU2");
- case IMGFMT_UYNV: return("Packed UYNV");
- case IMGFMT_cyuv: return("Packed CYUV");
- case IMGFMT_Y422: return("Packed Y422");
- case IMGFMT_YUY2: return("Packed YUY2");
- case IMGFMT_YUNV: return("Packed YUNV");
- case IMGFMT_UYVY: return("Packed UYVY");
-// case IMGFMT_YVYU: return("Packed YVYU");
- case IMGFMT_Y41P: return("Packed Y41P");
- case IMGFMT_Y211: return("Packed Y211");
- case IMGFMT_Y41T: return("Packed Y41T");
- case IMGFMT_Y42T: return("Packed Y42T");
- case IMGFMT_V422: return("Packed V422");
- case IMGFMT_V655: return("Packed V655");
- case IMGFMT_CLJR: return("Packed CLJR");
- case IMGFMT_YUVP: return("Packed YUVP");
- case IMGFMT_UYVP: return("Packed UYVP");
- case IMGFMT_MPEGPES: return("Mpeg PES");
+ case IMGFMT_RGB8: return "RGB 8-bit";
+ case IMGFMT_RGB15: return "RGB 15-bit";
+ case IMGFMT_RGB16: return "RGB 16-bit";
+ case IMGFMT_RGB24: return "RGB 24-bit";
+ case IMGFMT_RGB32: return "RGB 32-bit";
+ case IMGFMT_BGR8: return "BGR 8-bit";
+ case IMGFMT_BGR15: return "BGR 15-bit";
+ case IMGFMT_BGR16: return "BGR 16-bit";
+ case IMGFMT_BGR24: return "BGR 24-bit";
+ case IMGFMT_BGR32: return "BGR 32-bit";
+ case IMGFMT_YVU9: return "Planar YVU9";
+ case IMGFMT_IF09: return "Planar IF09";
+ case IMGFMT_YV12: return "Planar YV12";
+ case IMGFMT_I420: return "Planar I420";
+ case IMGFMT_IYUV: return "Planar IYUV";
+ case IMGFMT_CLPL: return "Planar CLPL";
+ case IMGFMT_Y800: return "Planar Y800";
+ case IMGFMT_Y8: return "Planar Y8";
+ case IMGFMT_IUYV: return "Packed IUYV";
+ case IMGFMT_IY41: return "Packed IY41";
+ case IMGFMT_IYU1: return "Packed IYU1";
+ case IMGFMT_IYU2: return "Packed IYU2";
+ case IMGFMT_UYNV: return "Packed UYNV";
+ case IMGFMT_cyuv: return "Packed CYUV";
+ case IMGFMT_Y422: return "Packed Y422";
+ case IMGFMT_YUY2: return "Packed YUY2";
+ case IMGFMT_YUNV: return "Packed YUNV";
+ case IMGFMT_UYVY: return "Packed UYVY";
+// case IMGFMT_YVYU: return "Packed YVYU";
+ case IMGFMT_Y41P: return "Packed Y41P";
+ case IMGFMT_Y211: return "Packed Y211";
+ case IMGFMT_Y41T: return "Packed Y41T";
+ case IMGFMT_Y42T: return "Packed Y42T";
+ case IMGFMT_V422: return "Packed V422";
+ case IMGFMT_V655: return "Packed V655";
+ case IMGFMT_CLJR: return "Packed CLJR";
+ case IMGFMT_YUVP: return "Packed YUVP";
+ case IMGFMT_UYVP: return "Packed UYVP";
+ case IMGFMT_MPEGPES: return "Mpeg PES";
}
- return("Unknown");
+ return "Unknown";
}
@@ -1110,14 +1110,14 @@ static int radeon_vid_ioctl(struct inode
if(copy_from_user(&frame,(int *) arg,sizeof(int)))
{
printk(RVID_MSG"FSEL failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
radeon_vid_frame_sel(frame);
break;
default:
printk(RVID_MSG"Invalid ioctl\n");
- return (-EINVAL);
+ return -EINVAL;
}
return 0;
@@ -1405,10 +1405,10 @@ static int radeon_vid_mmap(struct file *
vma->vm_end - vma->vm_start, vma->vm_page_prot))
{
printk(RVID_MSG"error mapping video memory\n");
- return(-EAGAIN);
+ return -EAGAIN;
}
- return(0);
+ return 0;
}
static int radeon_vid_release(struct inode *inode, struct file *file)
@@ -1430,14 +1430,14 @@ static int radeon_vid_open(struct inode
int minor = MINOR(inode->i_rdev);
if(minor != 0)
- return(-ENXIO);
+ return -ENXIO;
if(radeon_vid_in_use == 1)
- return(-EBUSY);
+ return -EBUSY;
radeon_vid_in_use = 1;
MOD_INC_USE_COUNT;
- return(0);
+ return 0;
}
#if LINUX_VERSION_CODE >= 0x020400
@@ -1523,7 +1523,7 @@ static int __init radeon_vid_initialize(
printk(RVID_MSG"MTRR set to ON\n");
}
#endif /* CONFIG_MTRR */
- return(0);
+ return 0;
}
int __init init_module(void)
Modified: trunk/drivers/tdfx_vid.c
==============================================================================
--- trunk/drivers/tdfx_vid.c (original)
+++ trunk/drivers/tdfx_vid.c Fri May 16 11:42:28 2008
@@ -258,12 +258,12 @@ static int agp_move(tdfx_vid_agp_move_t*
u32 src_h,src_l;
if(!(agp_mem||map_start))
- return (-EAGAIN);
+ return -EAGAIN;
if(m->move2 > 3) {
printk(KERN_DEBUG "tdfx_vid: AGP move invalid destination %d\n",
m->move2);
- return (-EAGAIN);
+ return -EAGAIN;
}
if(map_start)
@@ -511,7 +511,7 @@ static int tdfx_vid_set_yuv(unsigned lon
if(copy_from_user(&yuv,(tdfx_vid_yuv_t*)arg,sizeof(tdfx_vid_yuv_t))) {
printk(KERN_DEBUG "tdfx_vid:failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
banshee_make_room(2);
tdfx_outl(YUVBASEADDRESS,yuv.base & 0x01FFFFFF);
@@ -530,7 +530,7 @@ static int tdfx_vid_get_yuv(unsigned lon
if(copy_to_user((tdfx_vid_yuv_t*)arg,&yuv,sizeof(tdfx_vid_yuv_t))) {
printk(KERN_INFO "tdfx_vid:failed copy to userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
return 0;
@@ -544,14 +544,14 @@ static int tdfx_vid_set_overlay(unsigned
if(copy_from_user(&ov,(tdfx_vid_overlay_t*)arg,sizeof(tdfx_vid_overlay_t))) {
printk(KERN_DEBUG "tdfx_vid:failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
if(ov.dst_y < 0) {
int shift;
if(-ov.dst_y >= ov.src_height) {
printk(KERN_DEBUG "tdfx_vid: Overlay outside of the screen ????\n");
- return(-EFAULT);
+ return -EFAULT;
}
shift = (-ov.dst_y)/(double)ov.dst_height*ov.src_height;
ov.src[0] += shift*ov.src_stride;
@@ -564,7 +564,7 @@ static int tdfx_vid_set_overlay(unsigned
int shift;
if(-ov.dst_x >= ov.src_width) {
printk(KERN_DEBUG "tdfx_vid: Overlay outside of the screen ????\n");
- return(-EFAULT);
+ return -EFAULT;
}
shift = (-ov.dst_x)/(double)ov.dst_width*ov.src_width;
shift = ((shift+3)/2)*2;
@@ -592,7 +592,7 @@ static int tdfx_vid_set_overlay(unsigned
break;
default:
printk(KERN_DEBUG "tdfx_vid: Invalid overlay fmt 0x%x\n",ov.format);
- return (-EFAULT);
+ return -EFAULT;
}
// YUV422 need 4 bytes aligned stride and address
@@ -600,11 +600,11 @@ static int tdfx_vid_set_overlay(unsigned
ov.format == TDFX_VID_FORMAT_UYVY)) {
if((ov.src_stride & ~0x3) != ov.src_stride) {
printk(KERN_DEBUG "tdfx_vid: YUV need a 4 bytes aligned stride %d\n",ov.src_stride);
- return(-EFAULT);
+ return -EFAULT;
}
if((ov.src[0] & ~0x3) != ov.src[0] || (ov.src[1] & ~0x3) != ov.src[1]){
printk(KERN_DEBUG "tdfx_vid: YUV need a 4 bytes aligned address 0x%x 0x%x\n",ov.src[0],ov.src[1]);
- return(-EFAULT);
+ return -EFAULT;
}
}
@@ -622,7 +622,7 @@ static int tdfx_vid_set_overlay(unsigned
if(ov.dst_x >= screen_w || ov.dst_y >= screen_h ||
disp_h <= 0 || disp_h > screen_h || disp_w <= 0 || disp_w > screen_w) {
printk(KERN_DEBUG "tdfx_vid: Invalid overlay dimension and/or position\n");
- return (-EFAULT);
+ return -EFAULT;
}
// Setup the vidproc
// H scaling
@@ -702,7 +702,7 @@ static int tdfx_vid_overlay_on(void) {
//return 0;
if(vidcfg & (1<<8)) { // Overlay is already on
//printk(KERN_DEBUG "tdfx_vid: Overlay is already on.\n");
- return (-EFAULT);
+ return -EFAULT;
}
vidcfg |= (1<<8);
tdfx_outl(VIDPROCCFG,vidcfg);
@@ -719,7 +719,7 @@ static int tdfx_vid_overlay_off(void) {
}
printk(KERN_DEBUG "tdfx_vid: Overlay is already off.\n");
- return (-EFAULT);
+ return -EFAULT;
}
@@ -734,34 +734,34 @@ static int tdfx_vid_ioctl(struct inode *
case TDFX_VID_AGP_MOVE:
if(copy_from_user(&move,(tdfx_vid_agp_move_t*)arg,sizeof(tdfx_vid_agp_move_t))) {
printk(KERN_INFO "tdfx_vid:failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
return agp_move(&move);
case TDFX_VID_BUMP0:
if(copy_from_user(&int16,(u16*)arg,sizeof(u16))) {
printk(KERN_INFO "tdfx_vid:failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
return bump_fifo(int16);
case TDFX_VID_BLIT:
if(copy_from_user(&blit,(tdfx_vid_blit_t*)arg,sizeof(tdfx_vid_blit_t))) {
printk(KERN_INFO "tdfx_vid:failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
if(!tdfx_vid_blit(&blit)) {
printk(KERN_INFO "tdfx_vid: Blit failed\n");
- return(-EFAULT);
+ return -EFAULT;
}
return 0;
case TDFX_VID_GET_CONFIG:
if(copy_from_user(&cfg,(tdfx_vid_config_t*)arg,sizeof(tdfx_vid_config_t))) {
printk(KERN_INFO "tdfx_vid:failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
tdfx_vid_get_config(&cfg);
if(copy_to_user((tdfx_vid_config_t*)arg,&cfg,sizeof(tdfx_vid_config_t))) {
printk(KERN_INFO "tdfx_vid:failed copy to userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
return 0;
case TDFX_VID_SET_YUV:
@@ -776,7 +776,7 @@ static int tdfx_vid_ioctl(struct inode *
return tdfx_vid_overlay_off();
default:
printk(KERN_ERR "tdfx_vid: Invalid ioctl %d\n",cmd);
- return (-EINVAL);
+ return -EINVAL;
}
return 0;
}
@@ -846,13 +846,13 @@ static struct page *tdfx_vid_nopage(stru
if(n >= agp_mem->page_count) {
printk(KERN_DEBUG "tdfx_vid: Too far away\n");
- return ((struct page *)0UL);
+ return (struct page *)0UL;
}
phys = agp_mem->memory[n] & ~(0x00000fff);
page = virt_to_page(phys_to_virt(phys));
if(!page) {
printk(KERN_DEBUG "tdfx_vid: Can't get the page\n");
- return ((struct page *)0UL);
+ return (struct page *)0UL;
}
return page;
}
@@ -877,7 +877,7 @@ static int tdfx_vid_mmap(struct file *fi
if(map_start) { // Ok we map directly in the physcal ram
if(size*PAGE_SIZE > map_max) {
printk(KERN_ERR "tdfx_vid: Not enouth mem\n");
- return(-EAGAIN);
+ return -EAGAIN;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,3)
if(remap_page_range(vma, vma->vm_start,map_start,
@@ -888,26 +888,26 @@ static int tdfx_vid_mmap(struct file *fi
#endif
{
printk(KERN_ERR "tdfx_vid: error mapping video memory\n");
- return(-EAGAIN);
+ return -EAGAIN;
}
printk(KERN_INFO "Physical mem 0x%lx mapped in userspace\n",map_start);
return 0;
}
if(agp_mem)
- return(-EAGAIN);
+ return -EAGAIN;
agp_mem = drm_agp->allocate_memory(size,AGP_NORMAL_MEMORY);
if(!agp_mem) {
printk(KERN_ERR "Failed to allocate AGP memory\n");
- return(-ENOMEM);
+ return -ENOMEM;
}
if(drm_agp->bind_memory(agp_mem,0)) {
printk(KERN_ERR "Failed to bind the AGP memory\n");
drm_agp->free_memory(agp_mem);
agp_mem = NULL;
- return(-ENOMEM);
+ return -ENOMEM;
}
printk(KERN_INFO "%d pages of AGP mem allocated (%ld/%ld bytes) :)))\n",
@@ -924,7 +924,7 @@ static int tdfx_vid_mmap(struct file *fi
#endif
{
printk(KERN_ERR "tdfx_vid: error mapping video memory\n");
- return(-EAGAIN);
+ return -EAGAIN;
}
} else {
// Never swap it out
@@ -971,14 +971,14 @@ static int tdfx_vid_open(struct inode *i
#endif
if(minor != 0)
- return(-ENXIO);
+ return -ENXIO;
if(tdfx_vid_in_use == 1)
- return(-EBUSY);
+ return -EBUSY;
tdfx_vid_in_use = 1;
MOD_INC_USE_COUNT;
- return(0);
+ return 0;
}
#if LINUX_VERSION_CODE >= 0x020400
@@ -1033,7 +1033,7 @@ int init_module(void)
- return (0);
+ return 0;
}
Modified: trunk/input/joystick.c
==============================================================================
--- trunk/input/joystick.c (original)
+++ trunk/input/joystick.c Fri May 16 11:42:28 2008
@@ -120,9 +120,9 @@ int mp_input_joystick_read(int fd) {
btns &= ~(1 << ev.number);
btns |= (ev.value << ev.number);
if(ev.value == 1)
- return ((JOY_BTN0+ev.number) | MP_KEY_DOWN);
+ return (JOY_BTN0 + ev.number) | MP_KEY_DOWN;
else
- return (JOY_BTN0+ev.number);
+ return JOY_BTN0 + ev.number;
} else if(ev.type & JS_EVENT_AXIS) {
if(ev.value < -JOY_AXIS_DELTA && axis[ev.number] != -1) {
axis[ev.number] = -1;
Modified: trunk/libaf/window.c
==============================================================================
--- trunk/libaf/window.c (original)
+++ trunk/libaf/window.c Fri May 16 11:42:28 2008
@@ -157,7 +157,7 @@ static FLOAT_TYPE besselizero(FLOAT_TYPE
sum += u;
n++;
} while (u >= BIZ_EPSILON * sum);
- return(sum);
+ return sum;
}
/*
Modified: trunk/libass/ass_cache.c
==============================================================================
--- trunk/libass/ass_cache.c (original)
+++ trunk/libass/ass_cache.c Fri May 16 11:42:28 2008
@@ -86,7 +86,7 @@ static unsigned hashmap_hash(void* buf,
static int hashmap_key_compare(void* a, void* b, size_t size)
{
- return (memcmp(a, b, size) == 0);
+ return memcmp(a, b, size) == 0;
}
static void hashmap_item_dtor(void* key, size_t key_size, void* value, size_t value_size)
Modified: trunk/libmenu/vf_menu.c
==============================================================================
--- trunk/libmenu/vf_menu.c (original)
+++ trunk/libmenu/vf_menu.c Fri May 16 11:42:28 2008
@@ -215,7 +215,7 @@ static int config(struct vf_instance_s*
}
static int query_format(struct vf_instance_s* vf, unsigned int fmt){
- return (vf_next_query_format(vf,fmt));
+ return vf_next_query_format(vf,fmt);
}
static int open_vf(vf_instance_t *vf, char* args){
Modified: trunk/osdep/getch2-win.c
==============================================================================
--- trunk/osdep/getch2-win.c (original)
+++ trunk/osdep/getch2-win.c Fri May 16 11:42:28 2008
@@ -99,7 +99,7 @@ static int getch2_internal(void)
}
/*check for function keys*/
if(0x87 >= eventbuffer[i].Event.KeyEvent.wVirtualKeyCode && eventbuffer[i].Event.KeyEvent.wVirtualKeyCode >= 0x70)
- return (KEY_F + 1 + eventbuffer[i].Event.KeyEvent.wVirtualKeyCode - 0x70);
+ return KEY_F + 1 + eventbuffer[i].Event.KeyEvent.wVirtualKeyCode - 0x70;
/*only characters should be remaining*/
//printf("getch2: YOU PRESSED \"%c\" \n",eventbuffer[i].Event.KeyEvent.uChar.AsciiChar);
Modified: trunk/osdep/shmem.c
==============================================================================
--- trunk/osdep/shmem.c (original)
+++ trunk/osdep/shmem.c Fri May 16 11:42:28 2008
@@ -82,7 +82,7 @@ while(1){
return p;
#else
mp_msg(MSGT_OSDEP, MSGL_FATAL, "shmem: no SHM support was compiled in!\n");
- return(NULL);
+ return NULL;
#endif
}
default:
Modified: trunk/osdep/timer-linux.c
==============================================================================
--- trunk/osdep/timer-linux.c (original)
+++ trunk/osdep/timer-linux.c Fri May 16 11:42:28 2008
@@ -34,7 +34,7 @@ unsigned int GetTimer(void){
// float s;
gettimeofday(&tv,NULL);
// s=tv.tv_usec;s*=0.000001;s+=tv.tv_sec;
- return (tv.tv_sec*1000000+tv.tv_usec);
+ return tv.tv_sec * 1000000 + tv.tv_usec;
}
// Returns current time in milliseconds
@@ -43,7 +43,7 @@ unsigned int GetTimerMS(void){
// float s;
gettimeofday(&tv,NULL);
// s=tv.tv_usec;s*=0.000001;s+=tv.tv_sec;
- return (tv.tv_sec*1000+tv.tv_usec/1000);
+ return tv.tv_sec * 1000 + tv.tv_usec / 1000;
}
static unsigned int RelativeTime=0;
Modified: trunk/spudec.c
==============================================================================
--- trunk/spudec.c (original)
+++ trunk/spudec.c Fri May 16 11:42:28 2008
@@ -497,7 +497,7 @@ static void spudec_decode(spudec_handle_
int spudec_changed(void * this)
{
spudec_handle_t * spu = (spudec_handle_t*)this;
- return (spu->spu_changed || spu->now_pts > spu->end_pts);
+ return spu->spu_changed || spu->now_pts > spu->end_pts;
}
void spudec_assemble(void *this, unsigned char *packet, unsigned int len, int pts100)
Modified: trunk/subreader.c
==============================================================================
--- trunk/subreader.c (original)
+++ trunk/subreader.c Fri May 16 11:42:28 2008
@@ -68,7 +68,7 @@ unsigned long previous_sub_end;
#endif
static int eol(char p) {
- return (p=='\r' || p=='\n' || p=='\0');
+ return p=='\r' || p=='\n' || p=='\0';
}
/* Remove leading and trailing space */
More information about the MPlayer-cvslog
mailing list