mirror of
https://github.com/lbonn/rofi
synced 2024-11-15 08:37:17 +00:00
Reduce scope of index variable
This commit is contained in:
parent
21d20e6459
commit
6760453d80
1 changed files with 1 additions and 1 deletions
|
@ -591,7 +591,6 @@ static int locate_switcher ( KeySym key, unsigned int modstate )
|
|||
*/
|
||||
static void menu_capture_screenshot ( void )
|
||||
{
|
||||
int index = 0;
|
||||
if ( surface == NULL ) {
|
||||
// Nothing to store.
|
||||
fprintf ( stderr, "There is no rofi surface to store\n" );
|
||||
|
@ -611,6 +610,7 @@ static void menu_capture_screenshot ( void )
|
|||
char *fpath = NULL;
|
||||
const char *outp = g_getenv ( "ROFI_PNG_OUTPUT" );
|
||||
if ( outp == NULL ) {
|
||||
int index = 0;
|
||||
fpath = g_build_filename ( xdg_pict_dir, filename, NULL );
|
||||
while ( g_file_test ( fpath, G_FILE_TEST_EXISTS ) && index < 99 ) {
|
||||
g_free ( fpath );
|
||||
|
|
Loading…
Reference in a new issue