diff options
author | Josh Stone <jistone@redhat.com> | 2010-03-11 19:19:33 -0800 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2010-03-11 19:19:33 -0800 |
commit | 60d985370e63cb3b4c68489fc54276d8ac2b921b (patch) | |
tree | 2731ffe47f8e619b6fabcacf451275d49a3486fd /buildrun.cxx | |
parent | 0da46fcdec144f944838350f08f59a36b8709e90 (diff) | |
download | systemtap-steved-60d985370e63cb3b4c68489fc54276d8ac2b921b.tar.gz systemtap-steved-60d985370e63cb3b4c68489fc54276d8ac2b921b.tar.xz systemtap-steved-60d985370e63cb3b4c68489fc54276d8ac2b921b.zip |
Add startswith/endswith helpers
Inspired by the Python equivalents, these new utility functions just
make it a little cleaner to match at the beginning or end of a string.
Diffstat (limited to 'buildrun.cxx')
-rw-r--r-- | buildrun.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/buildrun.cxx b/buildrun.cxx index 084022bf..0140c69f 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -629,7 +629,7 @@ make_typequery(systemtap_session& s, string& module) int rc; string new_module; vector<string> headers; - bool kernel = (module.compare(0, 6, "kernel") == 0); + bool kernel = startswith(module, "kernel"); for (size_t end, i = kernel ? 6 : 0; i < module.size(); i = end + 1) { |