libbb: make index_in_substrings return -1 on ambiguous matches
function old new delta
index_in_substrings 67 93 +26
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c
index 6e8ec3e..adbcd77 100644
--- a/networking/udhcp/common.c
+++ b/networking/udhcp/common.c
@@ -435,8 +435,8 @@
}
break;
// case OPTION_BOOLEAN: {
-// static const char noyes[] ALIGN1 = "no\0yes\0";
-// buffer[0] = retval = index_in_strings(noyes, val);
+// static const char no_yes[] ALIGN1 = "no\0yes\0";
+// buffer[0] = retval = index_in_strings(no_yes, val);
// retval++; /* 0 - bad; 1: "no" 2: "yes" */
// break;
// }