The following commit has been merged in the master branch:
commit c9c914d07347ea67e90442305f8e780311f1906c
Author: Guillem Jover <[email protected]>
Date: Wed Feb 6 21:36:07 2013 +0100
u-a: Move alternative_get_best() after alternative_get_current()
We'll make alternative_get_current() use alternative_get_best(),
so to avoid a forward declaration let's move it afterwards.
diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c
index 28f17f3..88c49e6 100644
--- a/utils/update-alternatives.c
+++ b/utils/update-alternatives.c
@@ -1407,18 +1407,6 @@ alternative_save(struct alternative *a)
free(file);
}
-static struct fileset *
-alternative_get_best(struct alternative *a)
-{
- struct fileset *fs, *best;
-
- for (best = fs = a->choices; fs; fs = fs->next)
- if (fs->priority > best->priority)
- best = fs;
-
- return best;
-}
-
static const char *
alternative_set_current(struct alternative *a, char *new_choice)
{
@@ -1453,6 +1441,18 @@ alternative_get_current(struct alternative *a)
return alternative_set_current(a, file);
}
+static struct fileset *
+alternative_get_best(struct alternative *a)
+{
+ struct fileset *fs, *best;
+
+ for (best = fs = a->choices; fs; fs = fs->next)
+ if (fs->priority > best->priority)
+ best = fs;
+
+ return best;
+}
+
static void
alternative_display_query(struct alternative *a)
{
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]