@@ -426,6 +426,25 @@ compute_pgid(struct pathgroup * pgp)
pgp->id ^= (long)pp;
}
+static int pathcmp(const struct pathgroup *pgp, const struct pathgroup *cpgp)
+{
+ int i, j;
+ struct path *pp, *cpp;
+ int pnum = 0, found = 0;
+
+ vector_foreach_slot(pgp->paths, pp, i) {
+ pnum++;
+ vector_foreach_slot(cpgp->paths, cpp, j) {
+ if ((long)pp == (long)cpp) {
+ found++;
+ break;
+ }
+ }
+ }
+
+ return pnum - found;
+}
+
static int
pgcmp (struct multipath * mpp, struct multipath * cmpp)
{
@@ -627,25 +627,6 @@ int count_active_pending_paths(const struct multipath *mpp)
return do_pathcount(mpp, states, 3);
}
-int pathcmp(const struct pathgroup *pgp, const struct pathgroup *cpgp)
-{
- int i, j;
- struct path *pp, *cpp;
- int pnum = 0, found = 0;
-
- vector_foreach_slot(pgp->paths, pp, i) {
- pnum++;
- vector_foreach_slot(cpgp->paths, cpp, j) {
- if ((long)pp == (long)cpp) {
- found++;
- break;
- }
- }
- }
-
- return pnum - found;
-}
-
struct path *
first_path (const struct multipath * mpp)
{
@@ -598,7 +598,6 @@ struct path *mp_find_path_by_devt(const struct multipath *mpp, const char *devt)
int pathcount (const struct multipath *, int);
int count_active_paths(const struct multipath *);
int count_active_pending_paths(const struct multipath *);
-int pathcmp (const struct pathgroup *, const struct pathgroup *);
int add_feature (char **, const char *);
int remove_feature (char **, const char *);
... as it has only one caller, and make it static. No functional changes. Signed-off-by: Martin Wilck <mwilck@suse.com> --- libmultipath/configure.c | 19 +++++++++++++++++++ libmultipath/structs.c | 19 ------------------- libmultipath/structs.h | 1 - 3 files changed, 19 insertions(+), 20 deletions(-)