Small fix.

This commit is contained in:
QC 2014-05-24 16:23:01 +02:00
parent 69fdeded37
commit 241e4516c0
2 changed files with 4 additions and 5 deletions

View file

@ -995,7 +995,7 @@ MenuReturn menu ( char **lines, char **input, char *prompt, Time *time, int *shi
// then dividing by columns.
unsigned int max_rows = MIN ( config.menu_lines,
(unsigned int) (
( num_lines + ( columns - num_lines % columns ) ) /
( num_lines + ( columns - num_lines % columns ) % columns ) /
( columns )
) );
@ -1006,7 +1006,7 @@ MenuReturn menu ( char **lines, char **input, char *prompt, Time *time, int *shi
// If it would fit in one column, only use one column.
if ( num_lines < max_elements )
{
columns = ( num_lines + ( max_rows - num_lines % max_rows ) ) / max_rows;
columns = ( num_lines + ( max_rows - num_lines % max_rows ) % max_rows ) / max_rows;
max_elements = config.menu_lines * columns;
}
}

View file

@ -185,9 +185,8 @@ void parse_xresource_free ( void )
void xresource_dump ( void )
{
const char * namePrefix = "rofi";
const char * classPrefix = "rofi";
unsigned int entries = sizeof ( xrmOptions ) / sizeof ( *xrmOptions );
const char * namePrefix = "rofi";
unsigned int entries = sizeof ( xrmOptions ) / sizeof ( *xrmOptions );
for ( unsigned int i = 0; i < entries; ++i )
{
// Skip duplicates.