On 06/24/2013 08:42 AM, yangdongsheng wrote:
Signed-off-by: yangdongsheng <yangds.fnst(a)cn.fujitsu.com>
---
src/util/virstring.c | 14 ++++++++++++++
src/util/virstring.h | 2 ++
2 files changed, 16 insertions(+)
diff --git a/src/util/virstring.c b/src/util/virstring.c
index 1937f82..9dbc1b0 100644
--- a/src/util/virstring.c
+++ b/src/util/virstring.c
@@ -382,6 +382,20 @@ virStrncpy(char *dest, const char *src, size_t n, size_t destbytes)
}
/**
+ * virStrcmp
+ *
+ * return 0 if what a point is equal to what b point.
+ * else return -1.
+ */
+int
+virStrcmp(const char *a, const char *b)
We already have a 'STREQ' macro defined for that in internal.h:
http://libvirt.org/hacking.html#string_comparision
Jan