Re: [PATCH 1/2] util: Introduce virStrcmp into virstring.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/24/2013 03:07 PM, Ján Tomko wrote:
On 06/24/2013 08:42 AM, yangdongsheng wrote:
Signed-off-by: yangdongsheng<yangds.fnst@xxxxxxxxxxxxxx>
---
  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

Oh, yes, my fault. I will use STREQ and remove this patch in V2.
Thanx.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]