git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
tools/nolibc: prevent gcc from making memset() loop over itself
[sfrench/cifs-2.6.git]
/
tools
/
include
/
nolibc
/
string.h
diff --git
a/tools/include/nolibc/string.h
b/tools/include/nolibc/string.h
index 0932db3817d2cb7000ea73ac74ee0369cabd3c24..fffdaf6ff46731d5aac33b7b7a244471f24a6724 100644
(file)
--- a/
tools/include/nolibc/string.h
+++ b/
tools/include/nolibc/string.h
@@
-88,8
+88,11
@@
void *memset(void *dst, int b, size_t len)
{
char *p = dst;
- while (len--)
+ while (len--) {
+ /* prevent gcc from recognizing memset() here */
+ asm volatile("");
*(p++) = b;
+ }
return dst;
}