Project

General

Profile

Bug #7876

rgw: > on char* in rgw_rest_user

Added by Sage Weil about 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

rgw/rgw_rest_user.cc: In member function ‘virtual void RGWOp_Quota_Set::execute()’:
rgw/rgw_rest_user.cc:787:19: warning: ordered comparison of pointer with integer zero [-Wextra]
   if (s->length > 0) {
                   ^

on current master

Associated revisions

Revision ffd69ab3 (diff)
Added by Yehuda Sadeh about 10 years ago

rgw: use s->content_length instead of s->length

Fixes: #7876
Need to use the actual content length, not the pointer to the string.
This was probably working because there's correlation to when
content_length > 0 to whether s->length is not null.

Signed-off-by: Yehuda Sadeh <>

History

#1 Updated by Sage Weil about 10 years ago

  • Assignee set to Yehuda Sadeh

#2 Updated by Yehuda Sadeh about 10 years ago

  • Status changed from New to Fix Under Review

#3 Updated by Sage Weil about 10 years ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF