# HG changeset patch # User reimar # Date 1246027383 0 # Node ID 22db6af09a1d17498309233bd4cfb2d8b89b9082 # Parent 1f7497265ab6d4ee0c0c94f46a58f6bc0d2544ef Remove useless casts diff -r 1f7497265ab6 -r 22db6af09a1d libvo/vo_fbdev.c --- a/libvo/vo_fbdev.c Fri Jun 26 14:40:31 2009 +0000 +++ b/libvo/vo_fbdev.c Fri Jun 26 14:43:03 2009 +0000 @@ -185,7 +185,7 @@ return -1; } - if ((line = (char *) malloc(MAX_LINE_LEN + 1)) == NULL) { + if ((line = malloc(MAX_LINE_LEN + 1)) == NULL) { mp_msg(MSGT_VO, MSGL_V, "can't get memory for 'line': %s\n", strerror(errno)); return -2; } @@ -212,7 +212,7 @@ if (!validate_mode(mode)) goto err_out_not_valid; loop_enter: - if (!(fb_modes = (fb_mode_t *) + if (!(fb_modes = realloc(fb_modes, sizeof(fb_mode_t) * (nr_modes + 1)))) { mp_msg(MSGT_VO, MSGL_V, "can't realloc 'fb_modes' (nr_modes = %d):" " %s\n", nr_modes, strerror(errno)); @@ -949,8 +949,8 @@ int x_offset = 0, y_offset = 0; geometry(&x_offset, &y_offset, &out_width, &out_height, fb_xres, fb_yres); - frame_buffer = (uint8_t *) mmap(0, fb_size, PROT_READ | PROT_WRITE, - MAP_SHARED, fb_dev_fd, 0); + frame_buffer = mmap(0, fb_size, PROT_READ | PROT_WRITE, + MAP_SHARED, fb_dev_fd, 0); if (frame_buffer == (uint8_t *) -1) { mp_msg(MSGT_VO, MSGL_ERR, "Can't mmap %s: %s\n", fb_dev_name, strerror(errno)); return 1;