summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-06 14:51:50 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-06 14:51:50 -0700
commitb71d34f635d8827db76310a4b127a6926f2df1d7 (patch)
treed10d827cc53075661302ecc4d42c6d7974d83b2f
parenteb10c58258c3d4e6d207c390282f7d329e63910a (diff)
XdmcpDisposeARRAYofARRAY8: Reduce scope of i
As suggested by cppcheck Also makes it unsigned to match array->length (a CARD8) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--Array.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Array.c b/Array.c
index 5779cec..b7bcc48 100644
--- a/Array.c
+++ b/Array.c
@@ -250,10 +250,8 @@ XdmcpDisposeARRAY32 (ARRAY32Ptr array)
void
XdmcpDisposeARRAYofARRAY8 (ARRAYofARRAY8Ptr array)
{
- int i;
-
if (array->data != NULL) {
- for (i = 0; i < (int)array->length; i++)
+ for (unsigned int i = 0; i < (unsigned int) array->length; i++)
XdmcpDisposeARRAY8 (&array->data[i]);
free(array->data);
}