From: Paul Semel <phentex@amazon.com>
To: xen-devel@lists.xenproject.org
Cc: andrew.cooper3@citrix.com, Paul Semel <phentex@amazon.de>,
wipawel@amazon.de
Subject: [PATCH xtf] libc: Fix strcpy() assignment mistake
Date: Wed, 11 Oct 2017 13:07:29 +0000 [thread overview]
Message-ID: <1507727249-93295-1-git-send-email-phentex@amazon.com> (raw)
From: Paul Semel <phentex@amazon.de>
the strcpy function was doing a comparison instead of doing an
assignment.
Signed-off-by: Paul Semel <phentex@amazon.de>
Reviewed-by: Pawel Wieczorkiewicz <wipawel@amazon.de>
Reviewed-by: Bjoern Doebel <doebel@amazon.de>
Reviewed-by: Martin Pohlack <mpohlack@amazon.de>
---
common/libc/string.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/libc/string.c b/common/libc/string.c
index 94acc7e..967f2fa 100644
--- a/common/libc/string.c
+++ b/common/libc/string.c
@@ -24,7 +24,7 @@ size_t strnlen(const char *str, size_t max)
{
char *p = dst;
- while ( *p++ == *src++ )
+ while ( (*p++ = *src++) )
;
return dst;
--
1.8.3.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next reply other threads:[~2017-10-11 13:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 13:07 Paul Semel [this message]
2017-10-11 13:22 ` [PATCH xtf] libc: Fix strcpy() assignment mistake Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1507727249-93295-1-git-send-email-phentex@amazon.com \
--to=phentex@amazon.com \
--cc=andrew.cooper3@citrix.com \
--cc=phentex@amazon.de \
--cc=wipawel@amazon.de \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).