musl/src/string/memccpy.c, branch master musl - an implementation of the standard library for Linux-based systems remove redundant condition in memccpy 2020年03月20日T19:45:08+00:00 Alexander Monakov amonakov@ispras.ru 2020年03月09日T18:32:16+00:00 526df238d0d05fe4e8446720d9d0374646f82f82 Commit d9bdfd164 ("fix memccpy to not access buffer past given size") correctly added a check for 'n' nonzero, but made the pre-existing test '*s==c' redundant: n!=0 implies *s==c. Remove the unnecessary check. Reported by Alexey Izbyshev.
Commit d9bdfd164 ("fix memccpy to not access buffer past given size")
correctly added a check for 'n' nonzero, but made the pre-existing test
'*s==c' redundant: n!=0 implies *s==c. Remove the unnecessary check.
Reported by Alexey Izbyshev.
fix memccpy to not access buffer past given size 2018年12月02日T14:24:15+00:00 Quentin Rameau quinq@fifth.space 2018年11月11日T08:25:26+00:00 d9bdfd1644320ab916ea31d95da4bf641042209a memccpy would return a pointer over the given size when c is not found in the source buffer and n reaches 0.
memccpy would return a pointer over the given size when c is not
found in the source buffer and n reaches 0.
fix aliasing-based undefined behavior in string functions 2018年09月26日T18:39:10+00:00 Rich Felker dalias@aerifal.cx 2018年09月26日T18:39:10+00:00 4d0a82170a25464c39522d7190b9fe302045ddb2 use the GNU C may_alias attribute if available, and fallback to naive byte-by-byte loops if __GNUC__ is not defined. this patch has been written to minimize changes so that history remains reviewable; it does not attempt to bring the affected code into a more consistent or elegant form.
use the GNU C may_alias attribute if available, and fallback to naive
byte-by-byte loops if __GNUC__ is not defined.
this patch has been written to minimize changes so that history
remains reviewable; it does not attempt to bring the affected code
into a more consistent or elegant form.
include cleanups: remove unused headers and add feature test macros 2013年12月12日T05:09:18+00:00 Szabolcs Nagy nsz@port70.net 2013年12月12日T05:09:18+00:00 571744447c23f91feb6439948f3a619aca850dfb
use restrict everywhere it's required by c99 and/or posix 2008 2012年09月07日T02:44:55+00:00 Rich Felker dalias@aerifal.cx 2012年09月07日T02:44:55+00:00 400c5e5c8307a2ebe44ef1f203f5a15669f20347 to deal with the fact that the public headers may be used with pre-c99 compilers, __restrict is used in place of restrict, and defined appropriately for any supported compiler. we also avoid the form [restrict] since older versions of gcc rejected it due to a bug in the original c99 standard, and instead use the form *restrict.
to deal with the fact that the public headers may be used with pre-c99
compilers, __restrict is used in place of restrict, and defined
appropriately for any supported compiler. we also avoid the form
[restrict] since older versions of gcc rejected it due to a bug in the
original c99 standard, and instead use the form *restrict.
fix misplaced *'s in string functions (harmless) 2011年04月07日T20:19:30+00:00 Rich Felker dalias@aerifal.cx 2011年04月07日T20:19:30+00:00 cb8dff2149c393c94c2abbef186c564829b97e93
add implementation of memccpy function 2011年02月24日T17:35:42+00:00 Rich Felker dalias@aerifal.cx 2011年02月24日T17:35:42+00:00 b8ff2aaabb55521686179464593553fe1c91b2e2

AltStyle によって変換されたページ (->オリジナル) /