[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH xtf] libc: Fix strcpy() assignment mistake



From: Paul Semel <phentex@xxxxxxxxx>

the strcpy function was doing a comparison instead of doing an
assignment.

Signed-off-by: Paul Semel <phentex@xxxxxxxxx>

Reviewed-by: Pawel Wieczorkiewicz <wipawel@xxxxxxxxx>
Reviewed-by: Bjoern Doebel <doebel@xxxxxxxxx>
Reviewed-by: Martin Pohlack <mpohlack@xxxxxxxxx>
---
 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@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.