Skip to content

Commit

Permalink
stackdepot: remove code preventing compiler optimizations
Browse files Browse the repository at this point in the history
we're using -fno-builtin now
  • Loading branch information
ramosian-glider committed Nov 7, 2019
1 parent 42d2fd1 commit e741088
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/stackdepot.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,7 @@ int stackdepot_memcmp(const unsigned long *u1, const unsigned long *u2,
unsigned int n)
{
for ( ; n-- ; u1++, u2++) {
/*
* Prevent Clang from replacing this function with a bcmp()
* call.
*/
barrier();
if (*u1 != *u2)
if ((*u1) != (*u2))
return 1;
}
return 0;
Expand Down

0 comments on commit e741088

Please sign in to comment.