1 --- a/libmudflap/mf-hooks2.c
2 +++ b/libmudflap/mf-hooks2.c
5 TRACE ("%s\n", __PRETTY_FUNCTION__);
6 MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
13 TRACE ("%s\n", __PRETTY_FUNCTION__);
14 MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
15 MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
16 - bcopy (src, dest, n);
17 + memmove (dest, src, n);
22 TRACE ("%s\n", __PRETTY_FUNCTION__);
23 MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
24 MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
25 - return bcmp (s1, s2, n);
26 + return n == 0 ? 0 : memcmp (s1, s2, n);
31 size_t n = strlen (s);
32 TRACE ("%s\n", __PRETTY_FUNCTION__);
33 MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
34 - return index (s, c);
35 + return strchr (s, c);
40 size_t n = strlen (s);
41 TRACE ("%s\n", __PRETTY_FUNCTION__);
42 MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
43 - return rindex (s, c);
44 + return strrchr (s, c);
47 /* XXX: stpcpy, memccpy */