diff options
author | Andrew Burgess <aburgess@redhat.com> | 2023-01-23 15:21:05 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2023-03-03 09:56:21 +0000 |
commit | 6a208145d24c47912c8beb4f1f4b9abeb8d51134 (patch) | |
tree | 1025b0a9db8cf372100a16bcfdf2337790c013cf | |
parent | 67748abf53b22fd0273bb374923c101c9d597094 (diff) | |
download | gdb-6a208145d24c47912c8beb4f1f4b9abeb8d51134.zip gdb-6a208145d24c47912c8beb4f1f4b9abeb8d51134.tar.gz gdb-6a208145d24c47912c8beb4f1f4b9abeb8d51134.tar.bz2 |
gdb/python: replace strlen call with std::string::size call
Small cleanup to use std::string::size instead of calling strlen on
the result of std::string::c_str.
Should be no user visible changes after this call.
-rw-r--r-- | gdb/python/py-disasm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/python/py-disasm.c b/gdb/python/py-disasm.c index c3d8d8a..2dabec0 100644 --- a/gdb/python/py-disasm.c +++ b/gdb/python/py-disasm.c @@ -612,7 +612,7 @@ disasmpy_result_string (PyObject *self, void *closure) disasm_result_object *obj = (disasm_result_object *) self; gdb_assert (obj->content != nullptr); - gdb_assert (strlen (obj->content->c_str ()) > 0); + gdb_assert (obj->content->size () > 0); gdb_assert (obj->length > 0); return PyUnicode_Decode (obj->content->c_str (), obj->content->size (), |