diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-09-08 15:10:44 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-09-08 15:10:44 +0200 |
commit | 5b8a66fc23ad54a680b8bd9a0bb673ab048c365d (patch) | |
tree | c6b15675089d850e27fb66189a7cc4a4b5abcc08 /src/mds-registry/slave.c | |
parent | mds-registry: take care of danger (diff) | |
download | mds-5b8a66fc23ad54a680b8bd9a0bb673ab048c365d.tar.gz mds-5b8a66fc23ad54a680b8bd9a0bb673ab048c365d.tar.bz2 mds-5b8a66fc23ad54a680b8bd9a0bb673ab048c365d.tar.xz |
never volatile int, always volatile sig_atomic_t
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/mds-registry/slave.c')
-rw-r--r-- | src/mds-registry/slave.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mds-registry/slave.c b/src/mds-registry/slave.c index f98dc20..bda6ca6 100644 --- a/src/mds-registry/slave.c +++ b/src/mds-registry/slave.c @@ -345,10 +345,11 @@ void slave_destroy(slave_t* restrict this) */ size_t slave_marshal_size(const slave_t* restrict this) { - size_t rc = 2 * sizeof(int) + sizeof(ssize_t) + sizeof(size_t) + sizeof(uint64_t); + size_t rc; hash_entry_t* restrict entry; size_t n; + rc = sizeof(int) + sizeof(sig_atomic_t) + sizeof(ssize_t) + sizeof(size_t) + sizeof(uint64_t); rc += sizeof(int) + sizeof(time_t) + sizeof(long); rc += (strlen(this->client_id) + strlen(this->message_id) + 2) * sizeof(char); @@ -375,7 +376,7 @@ size_t slave_marshal(const slave_t* restrict this, char* restrict data) size_t n; buf_set_next(data, int, SLAVE_T_VERSION); - buf_set_next(data, int, this->closed); + buf_set_next(data, sig_atomic_t, this->closed); buf_set_next(data, ssize_t, this->node); buf_set_next(data, uint64_t, this->client); buf_set_next(data, int, this->timed); @@ -422,7 +423,7 @@ size_t slave_unmarshal(slave_t* restrict this, char* restrict data) /* buf_get_next(data, int, SLAVE_T_VERSION); */ buf_next(data, int, 1); - buf_get_next(data, int, this->closed); + buf_get_next(data, sig_atomic_t, this->closed); buf_get_next(data, ssize_t, this->node); buf_get_next(data, uint64_t, this->client); buf_get_next(data, int, this->timed); @@ -483,7 +484,7 @@ size_t slave_unmarshal_skip(char* restrict data) /* buf_get_next(data, int, SLAVE_T_VERSION); */ buf_next(data, int, 1); - buf_next(data, int, 1); + buf_next(data, sig_atomic_t, 1); buf_next(data, ssize_t, 1); buf_next(data, uint64_t, 1); buf_next(data, int, 1); |