From: Jim Meyering Date: Mon, 17 Aug 2009 08:30:52 +0000 (+0200) Subject: xattr.c: avoid warning about comparison between signed and unsigned X-Git-Tag: 1.0.68~37 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=c36fa40b981401cdbf61f596b804e79283d658b2;p=libguestfs.git xattr.c: avoid warning about comparison between signed and unsigned * daemon/xattr.c (getxattrs): Use an unsigned index. --- diff --git a/daemon/xattr.c b/daemon/xattr.c index 17d9382..1531070 100644 --- a/daemon/xattr.c +++ b/daemon/xattr.c @@ -195,11 +195,13 @@ getxattrs (const char *path, error: free (buf); if (r) { - if (r->guestfs_int_xattr_list_val) - for (i = 0; i < r->guestfs_int_xattr_list_len; ++i) { - free (r->guestfs_int_xattr_list_val[i].attrname); - free (r->guestfs_int_xattr_list_val[i].attrval.attrval_val); + if (r->guestfs_int_xattr_list_val) { + unsigned int k; + for (k = 0; k < r->guestfs_int_xattr_list_len; ++k) { + free (r->guestfs_int_xattr_list_val[k].attrname); + free (r->guestfs_int_xattr_list_val[k].attrval.attrval_val); } + } free (r->guestfs_int_xattr_list_val); } free (r);