summaryrefslogtreecommitdiffstats
path: root/tester/covoar/Target_sparc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tester/covoar/Target_sparc.cc')
-rw-r--r--tester/covoar/Target_sparc.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/tester/covoar/Target_sparc.cc b/tester/covoar/Target_sparc.cc
index fbdcd1e..a9435cb 100644
--- a/tester/covoar/Target_sparc.cc
+++ b/tester/covoar/Target_sparc.cc
@@ -56,23 +56,25 @@ namespace Target {
}
bool Target_sparc::isNopLine(
- const char* const line,
- int& size
+ const std::string& line,
+ int& size
)
{
- if (!strcmp( &line[strlen(line)-3], "nop")) {
+ size_t stringLen = line.length();
+
+ if ( line.substr( stringLen - 3 ) == "nop" ) {
size = 4;
return true;
}
- if (!strcmp( &line[strlen(line)-7], "unknown")) {
+ if ( line.substr( stringLen - 7 ) == "unknown" ) {
size = 4;
return true;
}
#define GNU_LD_FILLS_ALIGNMENT_WITH_RTS
#if defined(GNU_LD_FILLS_ALIGNMENT_WITH_RTS)
// Until binutils 2.20, binutils would fill with rts not nop
- if (!strcmp( &line[strlen(line)-3], "rts")) {
+ if ( line.substr( stringLen - 3 ) == "rts" ) {
size = 4;
return true;
}