changeset 35851:3ad8e723bb09

Simplify array index handling. Calculate index by a simple decrementation.
author ib
date Sun, 10 Mar 2013 14:27:22 +0000
parents 95ff5695a70b
children 1eb092275eb8
files gui/dialog/fileselect.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gui/dialog/fileselect.c	Sun Mar 10 14:26:48 2013 +0000
+++ b/gui/dialog/fileselect.c	Sun Mar 10 14:27:22 2013 +0000
@@ -398,8 +398,7 @@
    }
  if ( i == FF_ARRAY_ELEMS(fsHistory) )
   {
-   i=FF_ARRAY_ELEMS(fsHistory)-1;
-   nfree( fsHistory[i] );
+   nfree( fsHistory[--i] );
    entry=strdup( subject );
   }
  for ( ;i;i-- ) fsHistory[i]=fsHistory[i - 1];