Skip to content

Commit 49cc45a

Browse files
committed
libcephfs_proxy: remove redundant unsigned >= 0 comparison
Fix a clang warning in proxy_async.c where an unsigned value was being unnecessarily compared against 0: ``` /home/kefu/dev/ceph/src/libcephfs_proxy/proxy_async.c:29:12: warning: result of comparison of unsigned expression >= 0 is always true [-Wtautological-unsigned-zero-compare] 29 | if ((size >= 0) && !info->write) { | ~~~~ ^ ~ 1 warning generated. ``` Since unsigned values are always >= 0 by definition, remove this tautological check to resolve the "-Wtautological-unsigned-zero-compare" warning. Signed-off-by: Kefu Chai <[email protected]>
1 parent 960f078 commit 49cc45a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcephfs_proxy/proxy_async.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static int32_t libcephfsd_cbk_nonblocking_rw(proxy_async_t *async,
2626

2727
info->result = cbk->ll_nonblocking_rw.res;
2828

29-
if ((size >= 0) && !info->write) {
29+
if (!info->write) {
3030
iov = info->iov;
3131
count = info->iovcnt;
3232
while (size > 0) {

0 commit comments

Comments
 (0)