1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

libsmbconf: add handling of NULL strings to smbconf_find_in_array().

Michael
(This used to be commit a5923bafe9)
This commit is contained in:
Michael Adam
2008-04-15 13:50:27 +02:00
parent b396ad07d1
commit 0e7497936c

View File

@ -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;
}