]> xenbits.xensource.com Git - people/andrewcoop/xen-test-framework.git/commitdiff
libc: Fix strcpy() assignment mistake
authorPaul Semel <phentex@amazon.de>
Wed, 11 Oct 2017 13:07:29 +0000 (13:07 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 11 Oct 2017 13:17:25 +0000 (14:17 +0100)
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>
Reviewed-and-tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
common/libc/string.c

index 94acc7e576fd5cadb077e78a9d6de6a1b1653c57..967f2fab4b1995cce129ad1d623a49ace6c204ed 100644 (file)
@@ -24,7 +24,7 @@ char *(strcpy)(char *dst, const char *src)
 {
     char *p = dst;
 
-    while ( *p++ == *src++ )
+    while ( (*p++ = *src++) )
         ;
 
     return dst;