# HG changeset patch # User reimar # Date 1303490594 0 # Node ID d7b577e7e64411dbf67a87eb023356e1dec01f3f # Parent c52a2600de153199e98055b8c037ed0525679b8a Simplify by using FFMAX3. diff -r c52a2600de15 -r d7b577e7e644 libvo/vo_fbdev2.c --- a/libvo/vo_fbdev2.c Fri Apr 22 12:33:08 2011 +0000 +++ b/libvo/vo_fbdev2.c Fri Apr 22 16:43:14 2011 +0000 @@ -122,8 +122,7 @@ bcols = 1 << var->blue.length; /* Make our palette the length of the deepest color */ - cols = (rcols > gcols ? rcols : gcols); - cols = (cols > bcols ? cols : bcols); + cols = FFMAX3(rcols, gcols, bcols); red = malloc(cols * sizeof(red[0])); if(!red) {