From 19b2dcbeb230adc956d023dfea0d1aad9bb2a1ca Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 24 Nov 2015 17:32:47 +0100 Subject: [PATCH] nwrap: Don't fail if we want to add an existing entry Pair-Programmed-With: Michael Adam Signed-off-by: Andreas Schneider Signed-off-by: Michael Adam --- lib/nss_wrapper/nss_wrapper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/nss_wrapper/nss_wrapper.c b/lib/nss_wrapper/nss_wrapper.c index a080b808f54..f48b9cc7e8d 100644 --- a/lib/nss_wrapper/nss_wrapper.c +++ b/lib/nss_wrapper/nss_wrapper.c @@ -2622,12 +2622,14 @@ static bool nwrap_ed_inventarize_add_to_existing(struct nwrap_entdata *const ed, for (cursor = el; cursor->next != NULL; cursor = cursor->next) { if (cursor->ed == ed) { - return false; + /* The entry already exists in this list. */ + return true; } } if (cursor->ed == ed) { - return false; + /* The entry already exists in this list. */ + return true; } el_new = nwrap_entlist_init(ed); -- 2.34.1