mirror of
https://github.com/ceph/ceph
synced 2025-04-01 00:26:47 +00:00
rgw/rgw_rest.cc: remove dead and unneeded code
Since origin and meth are already checked to be true there is no need to check again in s->cio->print() after the initial check. 1019551 Logically dead code (CWE-561) 1019552 Logically dead code (CWE-561) Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
parent
5babc816e0
commit
b097f65627
@ -347,9 +347,9 @@ void dump_owner(struct req_state *s, string& id, string& name, const char *secti
|
||||
void dump_access_control(struct req_state *s, const char *origin, const char *meth,
|
||||
const char *hdr, const char *exp_hdr, uint32_t max_age) {
|
||||
if (origin && (origin[0] != '\0')) {
|
||||
s->cio->print("Access-Control-Allow-Origin: %s\n", origin?origin:"");
|
||||
s->cio->print("Access-Control-Allow-Origin: %s\n", origin);
|
||||
if (meth && (meth[0] != '\0'))
|
||||
s->cio->print("Access-Control-Allow-Methods: %s\n", meth?meth:"");
|
||||
s->cio->print("Access-Control-Allow-Methods: %s\n", meth);
|
||||
if (hdr && (hdr[0] != '\0'))
|
||||
s->cio->print("Access-Control-Allow-Headers: %s\n", hdr);
|
||||
if (exp_hdr && (exp_hdr[0] != '\0')) {
|
||||
|
Loading…
Reference in New Issue
Block a user