summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2010-04-29 19:56:37 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2010-05-05 15:46:15 -0700
commit5ea80e308026357aeee8b56230e85cb4d2e87631 (patch)
treef2bbf682feaf0de7fdf86162eb1d115b43f74b5c
parent27b1aa82a3f0db7d20a303ba093d1ec52de39bff (diff)
XdmcpARRAY8Equal: Use memcmp instead of rolling our own
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--A8Eq.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/A8Eq.c b/A8Eq.c
index 241d953..cf833d1 100644
--- a/A8Eq.c
+++ b/A8Eq.c
@@ -38,12 +38,9 @@ in this Software without prior written authorization from The Open Group.
int
XdmcpARRAY8Equal (const ARRAY8Ptr array1, const ARRAY8Ptr array2)
{
- int i;
-
if (array1->length != array2->length)
return FALSE;
- for (i = 0; i < (int)array1->length; i++)
- if (array1->data[i] != array2->data[i])
- return FALSE;
+ if (memcmp(array1->data, array2->data, array1->length) != 0)
+ return FALSE;
return TRUE;
}