diff options
Diffstat (limited to 'testsuites/psxtests/psxhdrs/string/stpncpy.c')
-rw-r--r-- | testsuites/psxtests/psxhdrs/string/stpncpy.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/testsuites/psxtests/psxhdrs/string/stpncpy.c b/testsuites/psxtests/psxhdrs/string/stpncpy.c index f81752de76..f7433a136f 100644 --- a/testsuites/psxtests/psxhdrs/string/stpncpy.c +++ b/testsuites/psxtests/psxhdrs/string/stpncpy.c @@ -40,12 +40,11 @@ int test( void ) { - char *dest = "Hello world"; - char *src = "Dude"; - size_t num = 2; + char src[] = "Dude"; + char dest[ sizeof( src ) ]; char *result; - result = stpncpy( dest, src, num ); + result = stpncpy( dest, src, sizeof( dest ) ); return ( result != NULL ); } |