Modify equal_pathnames to return true when one string is
substring of the other(when a value smaller than SIZE_MAX
is supplied as stop_len)
---
vswitchd/bridge.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 82c3bff..792a131 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -2751,6 +2751,10 @@ equal_pathnames(const char *a, const char *b, size_t
b_stoplen)
b++;
}
}
+ if (*b == '\0') {
+ /* b is a substring of a */
+ return true;
+ }
return false;
}
--
1.7.0.4
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev