]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw/common: fix error return value of hex_to_buf. 9367/head
authorYan Jun <yan.jun8@zte.com.cn>
Fri, 27 May 2016 08:26:31 +0000 (16:26 +0800)
committerYan Jun <yan.jun8@zte.com.cn>
Fri, 27 May 2016 08:26:31 +0000 (16:26 +0800)
commit253725ef1f200edd2eb7597de3f1dcda428b097a
tree5058665a7a5333512302a517b6904d8c6e61d554
parente843e7e7dc233c563b6a24443128c698e272cb02
rgw/common: fix error return value of hex_to_buf.

We should return negative value if error happens, otherwise
the caller may run into exceptions. eg, rgw_swift_verify_signed_token
will not return as follow:

  int ret = hex_to_buf(token, p.c_str(), len);
  if (ret < 0)
    return ret;

Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
src/rgw/rgw_common.h