summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/smbconf/smbconf_util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/lib/smbconf/smbconf_util.c b/source3/lib/smbconf/smbconf_util.c
index 20bd51a62b..b2e253dd26 100644
--- a/source3/lib/smbconf/smbconf_util.c
+++ b/source3/lib/smbconf/smbconf_util.c
@@ -111,12 +111,14 @@ bool smbconf_find_in_array(const char *string, char **list,
{
uint32_t i;
- if ((string == NULL) || (list == NULL)) {
+ if (list == NULL) {
return false;
}
for (i = 0; i < num_entries; i++) {
- if (strequal(string, list[i])) {
+ if (((string == NULL) && (list[i] == NULL)) ||
+ strequal(string, list[i]))
+ {
if (entry != NULL) {
*entry = i;
}