]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
hypertable/CephBroker.cc: use int64_t instead of uint64_t
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 26 Apr 2018 08:12:00 +0000 (10:12 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 26 Apr 2018 10:17:54 +0000 (12:17 +0200)
commit7a17f5938bc21ffb7eebccbf082cd439e65c4dad
tree7e68e971ad98429f0655a20d323feb2cfc787f2f
parentc2a4af6f470885c55f5f718d2fee3056e267f3a0
hypertable/CephBroker.cc: use int64_t instead of uint64_t

The usage of uint64_t to get the return value of ceph_lseek() will
lead to loss of the error code returned from the function. This will
break error case detection. Use a signed variable and cast before
offset returned instead.

Fix for:

[src/client/hypertable/CephBroker.cc:209]: (style) Checking if
 unsigned variable 'offset=ceph_lseek(cmount,fdata->fd,0,SEEK_CUR)' is less
 than zero.
[src/client/hypertable/CephBroker.cc:244]: (style) Checking if
 unsigned variable 'offset=(uint64_t)ceph_lseek(cmount,fdata->fd,0,SEEK_CUR)'
 is less than zero.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/client/hypertable/CephBroker.cc