Fix:Core:Fixed C standard compliance
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sat, 5 May 2012 09:46:08 +0000 (09:46 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sat, 5 May 2012 09:46:08 +0000 (09:46 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@5074 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/route.c
navit/navit/search.c

index 58171a2..6a4ac6f 100644 (file)
@@ -543,9 +543,9 @@ void
 route_set_profile(struct route *this, struct vehicleprofile *prof)
 {
        if (this->vehicleprofile != prof) {
-               this->vehicleprofile = prof;
                int dest_count = g_list_length(this->destinations);
                struct pcoord *pc;
+               this->vehicleprofile = prof;
                pc = g_alloca(dest_count*sizeof(struct pcoord));
                route_get_destinations(this, pc, dest_count);
                route_set_destinations(this, pc, dest_count, 1);
index 24b3d85..9de1efd 100644 (file)
@@ -736,9 +736,10 @@ search_list_get_unique(struct search_list *this_, char *unique)
        char *name,*max;
        int search_len=strlen(search);
        int i,count=sizeof(strings)/sizeof(char *);
+       GList *l;
 
        dbg(0,"enter level=%d %s %s\n",level,search,unique);
-       GList *l=le->list;
+       l=le->list;
        while (l) {
                switch (level) {
                case 0: