提交 cb8dff21 编写于 作者: R Rich Felker

fix misplaced *'s in string functions (harmless)

上级 4095f833
......@@ -22,7 +22,7 @@ void *memccpy(void *dest, const void *src, int c, size_t n)
k = ONES * c;
wd=(void *)d; ws=(const void *)s;
for (; n>=sizeof(size_t) && !HASZERO(*ws^k);
n-=sizeof(size_t), ws++, *wd++) *wd = *ws;
n-=sizeof(size_t), ws++, wd++) *wd = *ws;
d=(void *)wd; s=(const void *)ws;
}
for (; n && (*d=*s)!=c; n--, s++, d++);
......
......@@ -19,7 +19,7 @@ char *__stpncpy(char *d, const char *s, size_t n)
if (!n || !*s) goto tail;
wd=(void *)d; ws=(const void *)s;
for (; n>=sizeof(size_t) && !HASZERO(*ws);
n-=sizeof(size_t), ws++, *wd++) *wd = *ws;
n-=sizeof(size_t), ws++, wd++) *wd = *ws;
d=(void *)wd; s=(const void *)ws;
}
for (; n && (*d=*s); n--, s++, d++);
......
......@@ -21,7 +21,7 @@ size_t strlcpy(char *d, const char *s, size_t n)
if (n && *s) {
wd=(void *)d; ws=(const void *)s;
for (; n>=sizeof(size_t) && !HASZERO(*ws);
n-=sizeof(size_t), ws++, *wd++) *wd = *ws;
n-=sizeof(size_t), ws++, wd++) *wd = *ws;
d=(void *)wd; s=(const void *)ws;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册