diff options
author | Jim Meyering <meyering@redhat.com> | 2009-08-17 10:30:52 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-08-17 11:40:24 +0200 |
commit | c36fa40b981401cdbf61f596b804e79283d658b2 (patch) | |
tree | 86eb71ee27a576f0d529647bbd424f658b74ce3d /daemon | |
parent | fabf3f661579710d543db46718ec627a53bad61f (diff) | |
download | libguestfs-c36fa40b981401cdbf61f596b804e79283d658b2.tar.gz libguestfs-c36fa40b981401cdbf61f596b804e79283d658b2.tar.xz libguestfs-c36fa40b981401cdbf61f596b804e79283d658b2.zip |
xattr.c: avoid warning about comparison between signed and unsigned
* daemon/xattr.c (getxattrs): Use an unsigned index.
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/xattr.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/daemon/xattr.c b/daemon/xattr.c index 17d9382c..1531070d 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); |