diff options
author | Christoph Hellwig <hch@sgi.com> | 2005-04-21 10:02:03 +0000 |
---|---|---|
committer | Christoph Hellwig <hch@sgi.com> | 2005-04-21 10:02:03 +0000 |
commit | 925ee348492bcd7496ad0ff4ea60fe2e54c35c8d (patch) | |
tree | a8e6ebb0c5a412a6de3c6f92823f61cf3da954bd /getfattr | |
parent | 6b4ccfda21a2058bf6c8f5a356248ff9bffe0ac9 (diff) | |
download | attr-925ee348492bcd7496ad0ff4ea60fe2e54c35c8d.tar.gz |
GCC4 fixes
fix a warning about pointer signedness mismach
Diffstat (limited to 'getfattr')
-rw-r--r-- | getfattr/getfattr.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/getfattr/getfattr.c b/getfattr/getfattr.c index b40c8e9..4875990 100644 --- a/getfattr/getfattr.c +++ b/getfattr/getfattr.c @@ -224,28 +224,30 @@ int print_attribute(const char *path, const char *name, int *header_printed) { static char *value; static size_t value_size; - ssize_t length = 0; + int rval = 0; + size_t length = 0; if (opt_dump || opt_value_only) { - length = do_getxattr(path, name, NULL, 0); - if (length < 0) { + rval = do_getxattr(path, name, NULL, 0); + if (rval < 0) { fprintf(stderr, "%s: ", xquote(path)); fprintf(stderr, "%s: %s\n", xquote(name), strerror_ea(errno)); return 1; } - if (high_water_alloc((void **)&value, &value_size, length)) { + if (high_water_alloc((void **)&value, &value_size, rval)) { perror(progname); had_errors++; return 1; } - length = do_getxattr(path, name, value, value_size); - if (length < 0) { + rval = do_getxattr(path, name, value, value_size); + if (rval < 0) { fprintf(stderr, "%s: ", xquote(path)); fprintf(stderr, "%s: %s\n", xquote(name), strerror_ea(errno)); return 1; } + length = rval; } if (opt_strip_leading_slash) { |