]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r22240: merge from samba4:
authorStefan Metzmacher <metze@samba.org>
Mon, 16 Apr 2007 06:08:43 +0000 (06:08 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:19:22 +0000 (12:19 -0500)
use strlcpy instead of strcpy to make the IBM checker happy

metze

source/lib/replace/test/testsuite.c

index 7d45feec6b4c430a444f68cb0e9142f5d7eac2b8..165d222261e9375af55b3e06a9dfb7d5d547d1a3 100644 (file)
@@ -117,7 +117,7 @@ static int test_strlcat(void)
 {
        char tmp[10];
        printf("test: strlcat\n");
-       strcpy(tmp, "");
+       strlcpy(tmp, "", sizeof(tmp));
        if (strlcat(tmp, "bla", 3) != 3) {
                printf("failure: strlcat [\ninvalid return code\n]\n");
                return false;
@@ -128,7 +128,7 @@ static int test_strlcat(void)
                return false;
        }
 
-       strcpy(tmp, "da");
+       strlcpy(tmp, "da", sizeof(tmp));
        if (strlcat(tmp, "me", 4) != 4) {
                printf("failure: strlcat [\nexpected \"dam\", got \"%s\"\n]\n",
                           tmp);