summaryrefslogtreecommitdiff
path: root/libc/string/i386/strncpy.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-12-20 01:54:55 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-12-20 01:54:55 +0000
commit1d5c6ff2a4e8624a24165a9f3469b43113447b9d (patch)
tree5703f91d447817658a744140ed056a534c5f5776 /libc/string/i386/strncpy.c
parentbd7510cc6b7ea453c1bc1c12949174f6324a6bdc (diff)
string/i386/strncpy.c: fixlet for testing code
string/i386/strchrnul.c: new function, adapted from strchr.c text data bss dec hex filename - 240604 1759 11960 254323 3e173 lib/libuClibc-0.9.30-svn.so + 240449 1759 11960 254168 3e0d8 lib/libuClibc-0.9.30-svn.so
Diffstat (limited to 'libc/string/i386/strncpy.c')
-rw-r--r--libc/string/i386/strncpy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/string/i386/strncpy.c b/libc/string/i386/strncpy.c
index ba0c41063..e1c7f1dcf 100644
--- a/libc/string/i386/strncpy.c
+++ b/libc/string/i386/strncpy.c
@@ -68,7 +68,7 @@ int main()
str[4] = '*'; str[5] = '+'; strncpy(str, "abc", 5);
printf(strcmp(str, "abc") == 0 && str[4] == 0 && str[5] == '+' ?
"ok\n" : "BAD!\n");
- strncpy(str, "abc", 0); /* should do nothing */
+ strncpy(str, "def", 0); /* should do nothing */
printf(strcmp(str, "abc") == 0 && str[4] == 0 && str[5] == '+' ?
"ok\n" : "BAD!\n");
}