|
|
48b328 |
From e1b45e66bc185f5db4c252e1f3fb1b4400b4538e Mon Sep 17 00:00:00 2001
|
|
|
48b328 |
From: Sumit Bose <sbose@redhat.com>
|
|
|
48b328 |
Date: Fri, 22 Mar 2019 10:36:38 +0100
|
|
|
48b328 |
Subject: [PATCH 2/4] library: make _adcli_strv_has_ex public
|
|
|
48b328 |
|
|
|
48b328 |
Related to https://bugzilla.redhat.com/show_bug.cgi?id=1630187
|
|
|
48b328 |
---
|
|
|
48b328 |
library/adprivate.h | 4 ++++
|
|
|
48b328 |
library/adutil.c | 2 +-
|
|
|
48b328 |
2 files changed, 5 insertions(+), 1 deletion(-)
|
|
|
48b328 |
|
|
|
48b328 |
diff --git a/library/adprivate.h b/library/adprivate.h
|
|
|
48b328 |
index 0806430..55e6234 100644
|
|
|
48b328 |
--- a/library/adprivate.h
|
|
|
48b328 |
+++ b/library/adprivate.h
|
|
|
48b328 |
@@ -125,6 +125,10 @@ void _adcli_strv_free (char **strv);
|
|
|
48b328 |
int _adcli_strv_has (char **strv,
|
|
|
48b328 |
const char *str);
|
|
|
48b328 |
|
|
|
48b328 |
+int _adcli_strv_has_ex (char **strv,
|
|
|
48b328 |
+ const char *str,
|
|
|
48b328 |
+ int (* compare) (const char *match, const char*value));
|
|
|
48b328 |
+
|
|
|
48b328 |
char ** _adcli_strv_dup (char **strv) GNUC_WARN_UNUSED;
|
|
|
48b328 |
|
|
|
48b328 |
char * _adcli_strv_join (char **strv,
|
|
|
48b328 |
diff --git a/library/adutil.c b/library/adutil.c
|
|
|
48b328 |
index 76ea158..9b0c47f 100644
|
|
|
48b328 |
--- a/library/adutil.c
|
|
|
48b328 |
+++ b/library/adutil.c
|
|
|
48b328 |
@@ -221,7 +221,7 @@ _adcli_strv_add (char **strv,
|
|
|
48b328 |
return seq_push (strv, length, string);
|
|
|
48b328 |
}
|
|
|
48b328 |
|
|
|
48b328 |
-static int
|
|
|
48b328 |
+int
|
|
|
48b328 |
_adcli_strv_has_ex (char **strv,
|
|
|
48b328 |
const char *str,
|
|
|
48b328 |
int (* compare) (const char *match, const char*value))
|
|
|
48b328 |
--
|
|
|
48b328 |
2.20.1
|
|
|
48b328 |
|