diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2014-10-27 15:42:23 +0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2020-03-28 21:42:54 +0000 |
commit | 47458a252e45651bcf39282172ee688073234959 (patch) | |
tree | a3eb2681ff56b4da00280519df0f3d2ed4644381 | |
parent | 6cef351e06e79d4c976674939de5c321557b3cfb (diff) | |
download | klibc-47458a252e45651bcf39282172ee688073234959.tar.gz |
[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@gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | usr/dash/output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/dash/output.c b/usr/dash/output.c index 6618cc336b7e1..f9d87a6a60c13 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; |