replacing all vec_sort() invocations to vec_sort_with_function()

Change-Id: I05895827ed52be292112484cee7d0a2591b67335
Signed-off-by: Matus Fabian <matfabia@cisco.com>
diff --git a/vpp-japi/japi/vppjni.c b/vpp-japi/japi/vppjni.c
index 740a342..4274c31 100644
--- a/vpp-japi/japi/vppjni.c
+++ b/vpp-japi/japi/vppjni.c
@@ -362,6 +362,15 @@
   return (rv);
 }
 
+static int
+name_sort_cmp (void * a1, void * a2)
+{
+  name_sort_t * n1 = a1;
+  name_sort_t * n2 = a2;
+
+  return strcmp ((char *)n1->name, (char *)n2->name);
+}
+
 JNIEXPORT jstring JNICALL Java_org_openvpp_vppjapi_vppConn_getInterfaceList
   (JNIEnv * env, jobject obj, jstring name_filter)
 {
@@ -387,8 +396,7 @@
         }
     }));
 
-  vec_sort (nses, n1, n2, 
-            strcmp ((char *)n1->name, (char *)n2->name));
+  vec_sort_with_function (nses, name_sort_cmp);
 
   vec_foreach (ns, nses)
     s = format (s, "%s: %d, ", ns->name, ns->value);