Fix:Core:Move declarations to the begin
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Fri, 30 Sep 2011 12:53:31 +0000 (12:53 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Fri, 30 Sep 2011 12:53:31 +0000 (12:53 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4816 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/navit.c

index af920ec..64dffc8 100644 (file)
@@ -1554,23 +1554,22 @@ navit_former_destinations_active(struct navit *this_)
 }
 
 struct map* read_former_destinations_from_file(){
-       struct attr type;
+       struct attr type, data, flags, *attrs[4];
+       char *destination_file = bookmarks_get_destination_file(FALSE);
+       struct map *m;
+
        type.type=attr_type;
        type.u.str="textfile";
 
-       struct attr data;
        data.type=attr_data;
-       char *destination_file = bookmarks_get_destination_file(FALSE);
        data.u.str=destination_file;
 
-       struct attr flags;
        flags.type=attr_flags;
        flags.u.num=1;
 
-       struct attr *attrs[4];
        attrs[0]=&type; attrs[1]=&data; attrs[2]=&flags; attrs[3]=NULL;
 
-       struct map* m=map_new(NULL, attrs);
+       m=map_new(NULL, attrs);
        g_free(destination_file);
        return m;
 }