Actually use strncat in the strncat example

Spotted by Thomas Miletich <thomas.miletich@gmail.com>.
This commit is contained in:
Florian Weimer 2013-09-16 15:08:29 +02:00
parent 43ab73b257
commit 805f9a85c8

View file

@ -70,7 +70,7 @@ main(void)
assert(strncmp(buf, data, 9) == 0);
//+ C String-Functions-strncat-as-strncpy
buf[0] = '\0';
strncpy(buf, data, sizeof(buf) - 1);
strncat(buf, data, sizeof(buf) - 1);
//-
}
{