summaryrefslogtreecommitdiff
path: root/shared/nm-glib-aux/nm-shared-utils.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-07-31 10:04:37 +0200
committerThomas Haller <thaller@redhat.com>2020-08-05 10:22:11 +0200
commit00c6823ecc3a3972e1c68234b19cdf9ea9b3fe2c (patch)
treea0e1809e42a72d43a709602532b1cf710eddcddc /shared/nm-glib-aux/nm-shared-utils.c
parenta46940d0d7d5097143864f84844b67cdbb953061 (diff)
downloadNetworkManager-00c6823ecc3a3972e1c68234b19cdf9ea9b3fe2c.tar.gz
shared: add nm_strcmp_ascii_case_with_data() helper
Diffstat (limited to 'shared/nm-glib-aux/nm-shared-utils.c')
-rw-r--r--shared/nm-glib-aux/nm-shared-utils.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/shared/nm-glib-aux/nm-shared-utils.c b/shared/nm-glib-aux/nm-shared-utils.c
index e7dbaa8a81..78496c3154 100644
--- a/shared/nm-glib-aux/nm-shared-utils.c
+++ b/shared/nm-glib-aux/nm-shared-utils.c
@@ -1382,6 +1382,15 @@ nm_strcmp0_p_with_data (gconstpointer a, gconstpointer b, gpointer user_data)
}
int
+nm_strcmp_ascii_case_with_data (gconstpointer a, gconstpointer b, gpointer user_data)
+{
+ const char *s1 = a;
+ const char *s2 = b;
+
+ return g_ascii_strcasecmp (s1, s2);
+}
+
+int
nm_cmp_uint32_p_with_data (gconstpointer p_a, gconstpointer p_b, gpointer user_data)
{
const guint32 a = *((const guint32 *) p_a);