mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
libsmbconf: add handling of NULL strings to smbconf_find_in_array().
Michael
This commit is contained in:
parent
aba261a914
commit
a5923bafe9
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user