diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2014-11-29 22:23:38 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-12-03 11:09:33 +0100 |
commit | 8e44ddfccebe61728d8a2c1dafce36dfa944bc90 (patch) | |
tree | 4416023bfd484b6a09ca04110fec2880cfd811d6 /src/tools/tools_mc_util.c | |
parent | 75afab247bc9d1a27dce0b1a4b1ca6ebe106b887 (diff) | |
download | sssd-8e44ddfccebe61728d8a2c1dafce36dfa944bc90.tar.gz sssd-8e44ddfccebe61728d8a2c1dafce36dfa944bc90.tar.xz sssd-8e44ddfccebe61728d8a2c1dafce36dfa944bc90.zip |
sss_atomic_write_s() return value is signed
Reviewed-by: Sumit Bose <sbose@redhat.com>
Diffstat (limited to 'src/tools/tools_mc_util.c')
-rw-r--r-- | src/tools/tools_mc_util.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/tools/tools_mc_util.c b/src/tools/tools_mc_util.c index 2d6f3fb40..9634b86e2 100644 --- a/src/tools/tools_mc_util.c +++ b/src/tools/tools_mc_util.c @@ -37,8 +37,7 @@ static errno_t sss_mc_set_recycled(int fd) struct sss_mc_header h; off_t offset; off_t pos; - int ret; - + ssize_t written; offset = MC_PTR_DIFF(&h.status, &h); @@ -49,12 +48,12 @@ static errno_t sss_mc_set_recycled(int fd) } errno = 0; - ret = sss_atomic_write_s(fd, (uint8_t *)&w, sizeof(h.status)); - if (ret == -1) { + written = sss_atomic_write_s(fd, (uint8_t *)&w, sizeof(h.status)); + if (written == -1) { return errno; } - if (ret != sizeof(h.status)) { + if (written != sizeof(h.status)) { /* Write error */ return EIO; } |