about summary refs log tree commit diff
path: root/shared/nm-glib-aux
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2020-08-31 11:08:28 +0200
committerSebastien Bacher <seb128@ubuntu.com>2020-08-31 11:08:28 +0200
commitb51f06ff71a2060925bf3c0f04c44bd12480e670 (patch)
treefd305682823aff144f345fd1d439fa78f3d51a0a /shared/nm-glib-aux
parentb92fc658301eb82b80167a31179c9b839f151b18 (diff)
parente7b44ef4c80907346ec7492a09c45277459924fc (diff)
Merge branch 'upstream/latest' of https://salsa.debian.org/utopia-team/network-manager into upstream/latest
Diffstat (limited to 'shared/nm-glib-aux')
-rw-r--r--shared/nm-glib-aux/nm-macros-internal.h8
-rw-r--r--shared/nm-glib-aux/nm-shared-utils.c5
2 files changed, 12 insertions, 1 deletions
diff --git a/shared/nm-glib-aux/nm-macros-internal.h b/shared/nm-glib-aux/nm-macros-internal.h
index f56ed856..15bcd7e5 100644
--- a/shared/nm-glib-aux/nm-macros-internal.h
+++ b/shared/nm-glib-aux/nm-macros-internal.h
@@ -732,6 +732,10 @@ NM_G_ERROR_MSG (GError *error)
 #define _NM_IN_SET_EVAL_14(op, _x, y, ...)      (_x == (y)) op _NM_IN_SET_EVAL_13 (op, _x, __VA_ARGS__)
 #define _NM_IN_SET_EVAL_15(op, _x, y, ...)      (_x == (y)) op _NM_IN_SET_EVAL_14 (op, _x, __VA_ARGS__)
 #define _NM_IN_SET_EVAL_16(op, _x, y, ...)      (_x == (y)) op _NM_IN_SET_EVAL_15 (op, _x, __VA_ARGS__)
+#define _NM_IN_SET_EVAL_17(op, _x, y, ...)      (_x == (y)) op _NM_IN_SET_EVAL_16 (op, _x, __VA_ARGS__)
+#define _NM_IN_SET_EVAL_18(op, _x, y, ...)      (_x == (y)) op _NM_IN_SET_EVAL_17 (op, _x, __VA_ARGS__)
+#define _NM_IN_SET_EVAL_19(op, _x, y, ...)      (_x == (y)) op _NM_IN_SET_EVAL_18 (op, _x, __VA_ARGS__)
+#define _NM_IN_SET_EVAL_20(op, _x, y, ...)      (_x == (y)) op _NM_IN_SET_EVAL_19 (op, _x, __VA_ARGS__)
 
 #define _NM_IN_SET_EVAL_N2(op, _x, n, ...)      (_NM_IN_SET_EVAL_##n(op, _x, __VA_ARGS__))
 #define _NM_IN_SET_EVAL_N(op, type, x, n, ...)                      \
@@ -798,6 +802,10 @@ _NM_IN_STRSET_streq (const char *x, const char *s)
 #define _NM_IN_STRSET_EVAL_14(op, _x, y, ...)   _NM_IN_STRSET_streq (_x, y) op _NM_IN_STRSET_EVAL_13 (op, _x, __VA_ARGS__)
 #define _NM_IN_STRSET_EVAL_15(op, _x, y, ...)   _NM_IN_STRSET_streq (_x, y) op _NM_IN_STRSET_EVAL_14 (op, _x, __VA_ARGS__)
 #define _NM_IN_STRSET_EVAL_16(op, _x, y, ...)   _NM_IN_STRSET_streq (_x, y) op _NM_IN_STRSET_EVAL_15 (op, _x, __VA_ARGS__)
+#define _NM_IN_STRSET_EVAL_17(op, _x, y, ...)   _NM_IN_STRSET_streq (_x, y) op _NM_IN_STRSET_EVAL_16 (op, _x, __VA_ARGS__)
+#define _NM_IN_STRSET_EVAL_18(op, _x, y, ...)   _NM_IN_STRSET_streq (_x, y) op _NM_IN_STRSET_EVAL_17 (op, _x, __VA_ARGS__)
+#define _NM_IN_STRSET_EVAL_19(op, _x, y, ...)   _NM_IN_STRSET_streq (_x, y) op _NM_IN_STRSET_EVAL_18 (op, _x, __VA_ARGS__)
+#define _NM_IN_STRSET_EVAL_20(op, _x, y, ...)   _NM_IN_STRSET_streq (_x, y) op _NM_IN_STRSET_EVAL_19 (op, _x, __VA_ARGS__)
 
 #define _NM_IN_STRSET_EVAL_N2(op, _x, n, ...)   (_NM_IN_STRSET_EVAL_##n(op, _x, __VA_ARGS__))
 #define _NM_IN_STRSET_EVAL_N(op, x, n, ...)                       \
diff --git a/shared/nm-glib-aux/nm-shared-utils.c b/shared/nm-glib-aux/nm-shared-utils.c
index 681b4dd1..3d1b0098 100644
--- a/shared/nm-glib-aux/nm-shared-utils.c
+++ b/shared/nm-glib-aux/nm-shared-utils.c
@@ -4194,7 +4194,10 @@ nm_utils_hexstr2bin_alloc (const char *hexstr,
 	guint8 *buffer;
 	gsize buffer_len, len;
 
-	g_return_val_if_fail (hexstr, NULL);
+	if (G_UNLIKELY (!hexstr)) {
+		NM_SET_OUT (out_len, 0);
+		g_return_val_if_fail (hexstr, NULL);
+	}
 
 	nm_assert (required_len > 0 || out_len);