diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-08-06 14:51:50 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-08-06 14:51:50 -0700 |
commit | b71d34f635d8827db76310a4b127a6926f2df1d7 (patch) | |
tree | d10d827cc53075661302ecc4d42c6d7974d83b2f | |
parent | eb10c58258c3d4e6d207c390282f7d329e63910a (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.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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); } |