strmove(): Add API, and use it instead of its pattern - #1424
Open
alejandro-colomar wants to merge 3 commits into
Open
strmove(): Add API, and use it instead of its pattern#1424alejandro-colomar wants to merge 3 commits into
alejandro-colomar wants to merge 3 commits into
Conversation
alejandro-colomar
force-pushed
the
strmove
branch
4 times, most recently
from
December 15, 2025 00:44
bb758c4 to
bef0b44
Compare
alejandro-colomar
force-pushed
the
strmove
branch
from
December 23, 2025 21:59
bef0b44 to
1428b17
Compare
alejandro-colomar
force-pushed
the
strmove
branch
from
December 31, 2025 02:25
1428b17 to
9f5336c
Compare
alejandro-colomar
force-pushed
the
strmove
branch
from
January 1, 2026 14:26
9f5336c to
28aeb9f
Compare
alejandro-colomar
marked this pull request as ready for review
January 1, 2026 14:31
alejandro-colomar
force-pushed
the
strmove
branch
2 times, most recently
from
February 25, 2026 15:03
b1805c7 to
5708a7e
Compare
alejandro-colomar
force-pushed
the
strmove
branch
from
March 4, 2026 17:09
5708a7e to
9bdb78a
Compare
alejandro-colomar
force-pushed
the
strmove
branch
from
June 20, 2026 22:03
9bdb78a to
9b6c18c
Compare
alejandro-colomar
force-pushed
the
strmove
branch
from
August 19, 2026 09:42
9b6c18c to
e5c2238
Compare
alejandro-colomar
force-pushed
the
strmove
branch
4 times, most recently
from
August 25, 2026 15:33
970b7fd to
7888284
Compare
An interesting detail is that we require the second argument to be non-const, while the memmove(3) function gets a const void*. This is because the second argument should usually be just the same as the first one, plus some offset, and thus will have the same const qualification (that is, it will not be qualified). Don't return anything, as we're not using the return value. That avoids having to use a cast (we can't use a compound literal because of -Werror=unused-value). Signed-off-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
alejandro-colomar
force-pushed
the
strmove
branch
from
August 26, 2026 12:48
7888284 to
f32d45c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cc: @kees, @uecker
Revisions:
v1b
v2
v2b
v2c
v2d
v2e
v3
v4
v4b
v5