]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
msg/async: avoid referencing the temporary string
authorKefu Chai <kchai@redhat.com>
Wed, 28 Feb 2018 11:15:19 +0000 (19:15 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 28 Feb 2018 11:23:56 +0000 (19:23 +0800)
commita2f65d78c3485f154e5724abfcd0df8395c54c6a
tree9f833cfa7bdf032c4951d917ee5997877d3f25ef
parentbf5cb2e10e876892c75b613fd3b9e5d1cfa08d84
msg/async: avoid referencing the temporary string

* get_val<std::string>(...) returns a temporary std::string, so we cannot
  keep a reference to it after evaluating this method. so convert it to
  an integer right away in the same expression.
* use std::stoull() with base = 16, so we can parse a hex string
  representing up to 64 bits.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/msg/async/dpdk/dpdk_rte.cc