[klibc] [klibc:update-dash] dash: [OUTPUT] Add likely tag in outmem
klibc-bot for Herbert Xu
herbert at gondor.apana.org.au
Sat Mar 28 14:48:27 PDT 2020
Commit-ID: 47458a252e45651bcf39282172ee688073234959
Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=47458a252e45651bcf39282172ee688073234959
Author: Herbert Xu <herbert at gondor.apana.org.au>
AuthorDate: Mon, 27 Oct 2014 15:42:23 +0800
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 28 Mar 2020 21:42:54 +0000
[klibc] dash: [OUTPUT] Add likely tag in outmem
[ dash commit 53151f00720d5cd2df8cf196f4523d4f5b831598 ]
The branch in outmem where the string fits in the buffer is the
common case and is now marked as likely.
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/output.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr/dash/output.c b/usr/dash/output.c
index 6618cc33..f9d87a6a 100644
--- a/usr/dash/output.c
+++ b/usr/dash/output.c
@@ -144,7 +144,7 @@ outmem(const char *p, size_t len, struct output *dest)
size_t nleft;
nleft = dest->end - dest->nextc;
- if (nleft >= len) {
+ if (likely(nleft >= len)) {
buffered:
dest->nextc = mempcpy(dest->nextc, p, len);
return;
More information about the klibc
mailing list