Skip to content

Commit ae1d039

Browse files
author
Daniel Kroening
authored
Merge pull request diffblue#2322 from tautschnig/vs-cstring
Avoid using C string functions
2 parents aeafc49 + 7e03746 commit ae1d039

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/ansi-c/c_preprocess.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Author: Daniel Kroening, [email protected]
1414
#include <util/tempfile.h>
1515
#include <util/unicode.h>
1616

17-
#include <cstring>
1817
#include <fstream>
1918

2019
#if defined(__linux__) || \
@@ -120,19 +119,19 @@ static void error_parse_line(
120119

121120
while(*tptr!=0)
122121
{
123-
if(strncmp(tptr, " line ", 6)==0 && state!=4)
122+
if(has_prefix(tptr, " line ") && state != 4)
124123
{
125124
state=1;
126125
tptr+=6;
127126
continue;
128127
}
129-
else if(strncmp(tptr, " column ", 8)==0 && state!=4)
128+
else if(has_prefix(tptr, " column ") && state != 4)
130129
{
131130
state=2;
132131
tptr+=8;
133132
continue;
134133
}
135-
else if(strncmp(tptr, " function ", 10)==0 && state!=4)
134+
else if(has_prefix(tptr, " function ") && state != 4)
136135
{
137136
state=3;
138137
tptr+=10;

0 commit comments

Comments
 (0)